This file contains 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
{% codeblock main.m %} | |
GSHFraction * fraction; | |
fraction = [[GSHFraction alloc] initWithNumerator:10 andDenominator: 30]; | |
[fraction reduce]; | |
{% endcodeblock %} |
This file contains 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
/** | |
* CSS3 version of the Beijing Air icon | |
* http://dribbble.com/shots/363832-Beijing-Air-app | |
*/ | |
@import url(http://fonts.googleapis.com/css?family=Overlock); | |
body { | |
font-size: 10px; | |
background: url(http://f.cl.ly/items/3d460M1G3a0Z0R382O0e/BlurredLights.png) no-repeat center center fixed; |
This file contains 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
Process: Tweetbot [12260] | |
Path: /Applications/Tweetbot.app/Contents/MacOS/Tweetbot | |
Identifier: com.tapbots.TweetbotMacAdHoc | |
Version: 0.6 (635) | |
Code Type: X86-64 (Native) | |
Parent Process: launchd [178] | |
User ID: 501 | |
Date/Time: 2012-07-11 20:32:53.626 +0300 | |
OS Version: Mac OS X 10.8 (12A269) |
This file contains 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
irb(main):013:0> Shop.count | |
NoMethodError: undefined method `[]' for nil:NilClass | |
from /app/vendor/bundle/ruby/1.9.1/gems/moped-1.1.5/lib/moped/node.rb:74:in `block in command' | |
from /app/vendor/bundle/ruby/1.9.1/gems/moped-1.1.5/lib/moped/node.rb:522:in `[]' | |
from /app/vendor/bundle/ruby/1.9.1/gems/moped-1.1.5/lib/moped/node.rb:522:in `block (3 levels) in flush' | |
from /app/vendor/bundle/ruby/1.9.1/gems/moped-1.1.5/lib/moped/node.rb:521:in `map' | |
from /app/vendor/bundle/ruby/1.9.1/gems/moped-1.1.5/lib/moped/node.rb:521:in `block (2 levels) in flush' | |
from /app/vendor/bundle/ruby/1.9.1/gems/moped-1.1.5/lib/moped/node.rb:113:in `ensure_connected' | |
from /app/vendor/bundle/ruby/1.9.1/gems/moped-1.1.5/lib/moped/node.rb:517:in `block in flush' | |
from /app/vendor/bundle/ruby/1.9.1/gems/moped-1.1.5/lib/moped/node.rb:532:in `logging' |
This file contains 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 compiled with `NODE_ENV=production PUSHER_APP_KEY=123abc API_ENDPOINT_HOST=api.app.com brunch build` | |
# the following is produced and included into build. | |
config = {api: {}} | |
config.env = "production" | |
config.pusher_app_key = "123abc" | |
config.api.endpoint = "api.app.com" | |
module.exports = config |
This file contains 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
dynamo_demo(master)$ mix do clean, iex | |
Compiled lib/dynamo_demo.ex | |
Compiled lib/dynamo_demo/app.ex | |
Generated dynamo_demo.app | |
Interactive Elixir (0.7.0.dev) - press Ctrl+C to exit | |
Erlang R15B01 (erts-5.9.1) [source] [64-bit] [smp:4:4] [async-threads:0] [hipe] [kernel-poll:false] [dtrace] | |
iex(1)> DynamoDemo.start | |
Running DynamoDemo.App on port 3000 with Cowboy | |
:ok |
This file contains 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
dynamo_demo(master)$ mix iex | |
Interactive Elixir (0.7.0.dev) - press Ctrl+C to exit | |
Erlang R15B01 (erts-5.9.1) [source] [64-bit] [smp:4:4] [async-threads:0] [hipe] [kernel-poll:false] [dtrace] | |
iex(1)> System.build_info | |
{"0.7.0.dev","fatal: Not a git repository (or any of the parent directories): .git","Tue, 21 Aug 2012 21:29:41 GMT"} | |
iex(2)> |
This file contains 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
require 'formula' | |
class ErlangInstalled < Requirement | |
def message; <<-EOS.undent | |
Erlang is required to install. | |
You can install this with: | |
brew install erlang | |
Or you can use an official installer from: |
This file contains 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
# with current DSL | |
folder '~/Downloads' do | |
kind 'Movie' do | |
downloaded_from %r{destroyallsoftware} do | |
# do stuff | |
end | |
end | |
end | |
# with better matching DSL & label matcher |
This file contains 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
# Doing this | |
def a(&block) | |
block.call if block_given? | |
end | |
a { p 1 } | |
# is equivalent to doing this | |
def b | |
proc.call if block_given? |
OlderNewer