| ⌘T | go to file |
| ⌘⌃P | go to project |
| ⌘R | go to methods |
| ⌃G | go to line |
| ⌘KB | toggle side bar |
| ⌘⇧P | command prompt |
🤷♀️
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
| Then /^"([^"]*)" should be set as "([^"]*)"$/ do |term, definition| | |
| first(:xpath, "//dd[preceding-sibling::dt[.='#{term}']]").text. | |
| should == definition | |
| 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
| function parallel() { | |
| var args = Array.apply(null, arguments) | |
| , callback = args.pop() | |
| , returns = [] | |
| , len = 0 | |
| args.forEach(function (el, i) { | |
| el(function () { | |
| var a = Array.apply(null, arguments) | |
| , e = a.shift() | |
| if (e) return callback(e) |
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
| diff --git a/array.c b/array.c | |
| index b1616c5..16326fc 100644 | |
| --- a/array.c | |
| +++ b/array.c | |
| @@ -302,7 +302,7 @@ ary_alloc(VALUE klass) | |
| return (VALUE)ary; | |
| } | |
| -static VALUE | |
| +VALUE |
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
| <!-- in response to http://twitter.com/cramforce/status/57406808142266369 --> | |
| <html> | |
| <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script> | |
| <script> | |
| function getFollowers( name, cb ) { | |
| var obj = {} | |
| jQuery.getJSON( | |
| "https://api.twitter.com/1/followers/ids.json?screen_name=" + name + "&callback=?", cb |
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
| if defined?(RSpec) | |
| namespace :rcov do | |
| RSpec::Core::RakeTask.new(:rspec_aggregate) do |task| | |
| task.pattern = 'spec/**/*_spec.rb' | |
| task.rspec_opts = "--format progress" | |
| task.rcov = true | |
| task.rcov_opts = "--rails --exclude osx\/objc,spec,gems\/ " + | |
| "--aggregate tmp/coverage.data" | |
| 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
| // Relevant HTML and JS | |
| <label for="searchbox" id="searchboxPlaceholder">Search</label> | |
| <input type="text" name="Query" id="searchbox" /> | |
| <script> | |
| (function(d){ | |
| var sb = d.getElementById('searchbox'), | |
| ph = d.getElementById('searchboxPlaceholder'); | |
| var hide = function() { | |
| ph.style.display = 'none'; |
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 su - | |
| # mkdir /etc/resolver | |
| # cat > /etc/resolver/test | |
| nameserver 127.0.0.1 | |
| port 2155 | |
| ^D | |
| ^D | |
| $ brew install dnsmasq | |
| $ dnsmasq --port=2155 --no-resolv --address=/.test/127.0.0.1 | |
| $ ping foo.test |
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
| // Don't do this! Why? It will wait for two seconds, regardless. | |
| asyncTest( "multiple async w/ setTimeout", function() { | |
| expect( 4 ); | |
| var url = "http://jsfiddle.net/echo/jsonp/?callback=?"; | |
| $.getJSON( url, { a: 1 }, function( data ) { | |
| ok( data, "data is returned from the server" ); | |
| equal( data.a, "1", "the value of data.a should be 1" ); |