Showing posts with label tips. Show all posts
Showing posts with label tips. Show all posts

Sunday, October 14, 2012

Trip to San Francisco Guide

Here are my lessons learned after spending 9 days in San Francisco which is a follow up to my post Planning a trip to San Francisco where I solicited advice on what to do and where to eat.

Tips
  • Be prepared to do some walking, so bring comfortable shoes. Some days I walked up to 6 or 7 miles. There are also very steep hills/streets so keep that in mind before following the route your GPS gives you. The shortest distance may not be the easiest. For instance, it was brutal walking from the bay to Union Square via Mason St. Had I gone down a couple blocks I could have avoided the hill.
  • Biking across the Golden Gate Bridge over to Sausalito and taking a ferry back is a great idea. There are many places to rent bikes including Blazing Saddles.Walking to Sausalito is not such a great idea since there is a long stretch of walking on the side of road.
  • Sign up and try Uber. Much nicer service then a cab but typically more expensive.
  • Avoid walking through the Tenderloin, especially at night. Ask locals or your hotel concierge where that is if you can't figure it out.
  • Take advantage of the BART when you can. Great for getting from Union Square to the Mission or Pier 1. The best service I received while in San Francisco was from the vagrant lady who helped me buy my first BART ticket. She was a pro at working that thing. I should have given her a bigger tip considering the service I got elsewhere.
  • If you want to spend a whole day exploring the city do one of the open bus tours that allows you to hop-on and hop-off. The one I did had about 20 stops and another bus came about every 20 minutes, so for example you could hop-off and hang out at Haight Ashbury for a while and then continue on after you've spent some time there.
  • If you're going to visit Alcatraz and take the Cellhouse Audio Tour (recommended) allow for a good 3-4 hours minimum with travel time. Also, sign up in advance. I wanted to go on a Monday and it was sold out until Wednesday.
  • Be ware of the fog. If you're going to do something like take the open top bus tour or visit the Golden Gate, you want to do it on a clear day. The fog can come in and ruin the amazing scenery.
My Favorites
  • Zeitgeist - great beer selection reasonably priced. Great bloody marries too!
  • Mission Beach Cafe for weekend breakfast - Get a side of their bacon. I'm still thinking about it! There's usually a good hour wait to get in so be prepared for that. We put our name on the list and walked to Zeitgeist to get a bloody marry and timed it perfectly. 
  • Zero Zero - we had the Avocado Bruschetta, Geary pizza, Little Shells, and build your own desert sunday. It was all excellent. Some of the best food I had while I was there.
  • Fog Harbor Fish House - I ate lunch here and had an excellent view of Alcatraz and the Golden Gate. I also had dinner and it was a bit dark to take in the view but the food was still excellent both times.
  • Blue Bottle Coffee - excellent coffee
Disappointments
  • You can't get into a Giants game using a StubHub ticket/barcode that's on your phone. This is the city that arguably has more startups and innovation then the rest of the world combined AND charges $.10 for each grocery bag you use. I'm dumbfounded that I had to go to will call and have a paper ticket printed off.
  • Versus Minnesota, service (like at restaurants) is on average slower and less attentive, but relax you're on vacation. ;)






Friday, March 18, 2011

Ruby Cheat Sheet for .NET Developers

....or anybody who sucks at OSX/Linux.

I've been learning Ruby on Rails over the last couple of months and when you've been programming on Windows with Visual Studio for as many years as I have it's a major learning curve to switch to programming Ruby on OSX or Linux. So I've created a cheat sheet to help me with all the little details I routinely have to look up.

Ruby on Rails Command Line

Preview Site:
rails server
Preview Site as Production:
rails s -e production
Test DB and be able to rollback changes:
rails console --sandbox
Reset DB:
rake db:reset
Modify DB for real:
rails console
View ActiveRecord Raw SQL:
tail -f log/development.log
Migrate Development DB
rake db:migrate (DEV)
Migrate Test DB
rake db:test:prepare
Migrate Production DB
rake db:migrate RAILS_ENV=production
Create a New DB Migration:
rails generate migration [MIGRATION NAME] 
rails generate migration add_email_uniqueness_index
View Routes:
rake routes
Start Autotest:
autotest


Output debug info in Model:
logger.debug @user.attributes.inspect
Add Debug info to Layout:
<%= debug(params) if Rails.env.development? %>
Routes:
NAMED ROUTE            PATH
users_path             /users
user_path(@user)       /users/1
new_user_path          /users/new
edit_user_path(@user)  /users/1/edit
users_url              http://localhost:3000/users
user_url(@user)        http://localhost:3000/users/1
new_user_url           http://localhost:3000/users/new
edit_user_url(@user)   http://localhost:3000/users/1/edit

RESTFUL Routes:
GET      /photos           index     display a list of all photos
GET      /photos/new       new       return an HTML form for creating a new photo
POST     /photos           create    create a new photo
GET      /photos/:id       show      display a specific photo
GET      /photos/:id/edit  edit      return an HTML form for editing a photo
PUT      /photos/:id       update    update a specific photo
DELETE   /photos/:id       destroy   delete a specific photo


Assign if variable is undefined:
||=  
@current_user ||= user_from_remember_token
Variable Scope:
$            A global variable
@            An instance variable
[a-z] or _   A local variable
[A-Z]        A constant
@@           A class variable
http://www.techotopia.com/index.php/Ruby_Variable_Scope 


Upgrade to the latest version of rvm
rvm update --head
Install a version of Ruby
rvm install 1.9.2
Working with gemsets
rvm info                        # show the current environment
rvm 1.8.7                       # use the ruby to manage gemsets for
rvm gemset create project_name  # create a gemset
rvm gemset use project_name     # use a gemset in this ruby
rvm gemset list                 # list gemsets in this ruby
rvm gemset delete project_name  # delete a gemset
rvm 1.9.1@other_project_name    # use another ruby and gemset
Default for Project:
echo "rvm 1.9.1@MyProject" > ~/projects/MyProject/.rvmrc

Add gem to Gemfile
Run:
bundle install
or 
bundle update
or (for self contained)
bundle pack


Extract tar.gz:
tar -zxvf yourfile.tar.gz
Find a file:
find . -name "controller.rb" 
http://helpdesk.ua.edu/unix/tipsheet/tipv1n10.html
Delete Folder:
rm -rf
Add JPG File Extension to Multiple files:
for f in *; do mv "$f" "$f.jpg"; done

Remove file from repo:
git rm --cached


GitHub

Checkout:
git clone git://github.com/crdeutsch/MVC3-Boilerplate.git
Publish:
git push origin master


Enable Git Flow
git flow init
Start a Feature
git flow feature start myfeature
Finish a Feature
git flow feature finish myfeature


Create App:
heroku create
Publish:
git push heroku master
Migrate DB:
heroku rake db:migrate
View Logs:
heroku console
File.open('log/production.log', 'r').each_line { |line| puts line }


Compile CSS:
compass compile
Watch project for changes and compile whenever it does:
compass watch


New site:
staticmatic setup my_site
Preview:
staticmatic preview my_site
Build:
staticmatic build my_site

OSX

Screen Capture:

Full Screen:
Hold down Apple key ⌘ + Shift + 3 and release all
Portion of your screen:
Hold down Apple key ⌘ + Shift + 4 and release all key
Application window:
Hold down Apple key ⌘ + Shift + 4 and release all key
Now, You will see the mouse cursor will change to +
Press the space bar once


This list is far from comprehensive, but it's pretty much everything I've had to google at least once to figure out and I plan to keep adding to it as I progress.

If you have some nuggets to share add them to the comments.

If lots of people want to contribute we should probably move this to a different format (Wiki, Markdown?) but until then I'll keep maintaining it here.

Sunday, September 5, 2010

Save Web Page as PDF on iPad then Annotate

I was viewing the schedule for Twin Cities Code Camp on my iPad this morning and wanted to circle the talks I was interested in. I quickly realized I wasn't going to be able to do this without some help. After some research here's what I came up with.
  1. Configure your iPad to sync Bookmarks with one of your browsers (I picked Safari)


  2. Add this Bookmarklet for converting web pages to PDF from PDF Download to Safari (originally found this tip on "The Heat Web")

  3. Sync your iPad with iTunes to get the Bookmarklet onto your iPad.
  4. Install one of the iPad PDF Annotation apps. I picked Noterize by Robert Stretch. I also looked at iAnnotate which I'll try next if I don't like Noterize.
  5. Browse to the web page you want to annotate, open your Bookmarks, and select Save Page As PDF
  6. Unfortuantely I had to hit stop and then "refresh" in Safari to get PDF Download to work (your results may vary)
  7. PDF Download will eventually open the page as a PDF. (it can take a while)
  8. Copy the URL of the PDF.
  9. Open Noterize, go to the root of your Notes and click Import PDF/PPT. Select the Web Browser option and paste in the copied URL.
  10. The PDF is now available to annotate.
I also highly recommend using Dropbox so you can easily save your annotations and view them on your computer or in other apps that support Dropbox. You can use Dropbox to easily get PDFs into Noterize from your computer as well.

Noterize does not automatically save your PDF's to Dropbox. You'll need to Share the PDF within Noterize after it has been annotated and then upload to Dropbox.

I'd love to hear from you! Leave a comment or reply to @cdeutsch on Twitter if you find something useful.