workflow:
$ rails g model NameOfModel
invoke active_record
create db/migrate/YYYYMMDDHHMMSS_create_name_of_models.rb| #!/bin/sh | |
| mkdir ${TMPDIR}/com.apple.IconServices |
When using directives, you often need to pass parameters to the directive. This can be done in several ways. The first 3 can be used whether scope is true or false. This is still a WIP, so validate for yourself.
Raw Attribute Strings
<div my-directive="some string" another-param="another string"></div>| Key/Command | Description |
|---|---|
| Ctrl + A | Go to the beginning of the line you are currently typing on |
| Ctrl + E | Go to the end of the line you are currently typing on |
| Ctrl + L | Clears the Screen |
| Command + K | Clears the Screen |
| Ctrl + U | Clears the line before the cursor position. If you are at the end of the line, clears the entire line. |
| Ctrl + H | Same as backspace |
| /* | |
| * From css-tricks.com | |
| * http://css-tricks.com/snippets/css/media-queries-for-standard-devices/ | |
| */ | |
| /* Smartphones (portrait and landscape) ----------- */ | |
| @media only screen | |
| and (min-device-width : 320px) | |
| and (max-device-width : 480px) { | |
| /* Styles */ |
The FAQ maintained by Github covers most stumbling blocks, some other tips and tricks supplied here.
Add _site to .gitignore. The generated site should not be uploaded to Github since its gets generated by github.
| #!/usr/bin/env sh | |
| ## | |
| # This is script with usefull tips taken from: | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # | |
| # install it: | |
| # curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
| # |
| function(data){ | |
| //loop through the results with the following function | |
| $.each(data.photoset.photo, function(i,item){ | |
| //build the url of the photo in order to link to it | |
| var photoURL = 'http://farm' + item.farm + '.static.flickr.com/' + item.server + '/' + item.id + '_' + item.secret + '_m.jpg' | |
| //turn the photo id into a variable | |
| var photoID = item.id; |
| /** | |
| * jQuery Masonry v2.1.0 | |
| * A dynamic layout plugin for jQuery | |
| * The flip-side of CSS Floats | |
| * http://masonry.desandro.com | |
| * | |
| * Licensed under the MIT license. | |
| * Copyright 2011 David DeSandro | |
| */ | |