- Install Git
- Create a GitHub account
- Open Terminal
/Applications/Utilities/Terminal.app
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # When an RSpec test like this fails, | |
| # | |
| # @my_array.should == [@some_model, @some_model2] | |
| # | |
| # RSpec will call inspect on each of the objects to "help" you figure out | |
| # what went wrong. Well, inspect will usually dump a TON OF SHIT and make trying | |
| # to figure out why `@my_array` is not made up of `@some_model` and `@some_model2`. | |
| # | |
| # This little module and technique helps get around that. It will redefine `inspect` | |
| # if you include it in your model object. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| jQuery.fn.extend insertAtCaret: (myValue) -> | |
| @each (i) -> | |
| if document.selection | |
| # For browsers like Internet Explorer | |
| @focus() | |
| sel = document.selection.createRange() | |
| sel.text = myValue | |
| @focus() | |
| else if @selectionStart or @selectionStart is "0" | |
| # For browsers like Firefox and Webkit based |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Char Unicode | |
| ------------------------------ | |
| Ä, ä \u00c4, \u00e4 | |
| Ö, ö \u00d6, \u00f6 | |
| Ü, ü \u00dc, \u00fc | |
| ß \u00df |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace :data do | |
| task :console_logger do | |
| ActiveRecord::Base.logger = Logger.new(STDOUT) | |
| end | |
| task :do_some_tweaking, [:user_email, :confirmation] => [:environment, :console_logger] do |t, args| | |
| User.transaction do | |
| # ... | |
| raise "Rolling back after dry run - add CONFIRM to confirm!" unless args[:confirmation] == 'CONFIRM' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Gemfile.lock |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo apt-get install vagrant | |
| git clone https://bitbucket.org/puffnfresh/vagrant-haskell-heroku.git | |
| cd vagrant-haskell-heroku | |
| vagrant up | |
| vagrant ssh | |
| cabal update | |
| cabal install cabal-install | |
| cabal --version | |
| > cabal-install version 0.14.0 | |
| > using version 1.14.0 of the Cabal library |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace :assets do | |
| task :check do | |
| root_dir = File.join(File.dirname(__FILE__),"..","..") | |
| assets_last_modified_at = Dir["#{root_dir}/app/assets/**/**"].map { |p| File.mtime(p) }.sort.last | |
| assets_last_compiled_at = Dir["#{root_dir}/public/assets/**/**"].map { |p| File.mtime(p) }.sort.last | |
| if assets_last_modified_at > assets_last_compiled_at | |
| fail "Assets need to precompiled; last asset modified at #{assets_last_modified_at}" | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| session_name= | |
| session_pre= | |
| if [[ "$1" ]]; then | |
| session_name="-t $1" | |
| session_pre="$1" | |
| fi | |
| session_path=$(tmux list-panes -t $session_pre:1 -F "#{pane_start_path}") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <textarea name="my-xml-editor" data-editor="xml" rows="15"></textarea> | |
| ... | |
| <textarea name="my-markdown-editor" data-editor="markdown" rows="15"></textarea> | |
| ... | |
| <script src="//d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js"></script> | |
| <script> | |
| // Hook up ACE editor to all textareas with data-editor attribute | |
| $(function () { |