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
| whereami() | |
| { | |
| export THIS_IS_NOT_MY_BEAUTIFUL_HOUSE=$1 | |
| } | |
| __thereami() | |
| { | |
| local curtask="$THIS_IS_NOT_MY_BEAUTIFUL_HOUSE" | |
| if [ -n "$curtask" ]; then | |
| if [ -n ${1-} ]; then |
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
| def record_purchase(customer, basket) | |
| basket.each do |product| | |
| product.buyers << customer | |
| end | |
| # Render these into the relation map -- this can be done out of process too | |
| basket.each do |x| | |
| all_products.each do |y| | |
| intersection[x][y] = x.buyers.intersect(y.buyers).count | |
| 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 run_function($name, $params) { | |
| // Actually run the function in question | |
| } | |
| while(true) { | |
| // Wait for a connection and extract the function to start | |
| if (function_exists('pcntl_fork')) { | |
| $pid = pcntl_fork(); | |
| if ($pid == -1) { |
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
| // windows/*.js look like: | |
| definePage( 'main', { | |
| load: function() {}, | |
| unload: function() {}, | |
| show: function() {}, |
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
| --- a/Snares/MHPlanarViewController.m | |
| +++ b/Snares/MHPlanarViewController.m | |
| @@ -55,18 +55,32 @@ | |
| [previous viewWillDisappear: YES]; | |
| [controller viewWillAppear: YES]; | |
| - [UIView transitionWithView: self.view | |
| - duration: 0.6 | |
| - options: UIViewAnimationOptionTransitionCurlUp | |
| - animations: ^{ |
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
| server { | |
| server_name <%= "#{site_hostname} #{site_aliases}" %>; | |
| listen 80 default; | |
| location / { | |
| proxy_pass http://<%= find_servers(:roles => :app).first %>; | |
| } | |
| proxy_buffering on; | |
| proxy_redirect off; |
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
| module Matchers | |
| def add_matcher | |
| [BaseUrlMatcher, YoutubeMatcher].each do |m| | |
| extend m if m.const_get(:Pattern).match @url | |
| end | |
| end | |
| module BaseUrlMatcher | |
| Pattern = // |
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
| ×[mat@calculon ~]$ lsof . | |
| COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME | |
| iTunes 125 mat 25r DIR 14,4 1666 289319 . | |
| Dock 132 mat 16r DIR 14,4 1666 289319 . | |
| Dock 132 mat 17r DIR 14,4 1666 289319 . | |
| Google 18386 mat 59r DIR 14,4 1666 289319 . | |
| zsh 18713 mat cwd DIR 14,4 1666 289319 . | |
| lsof 18758 mat cwd DIR 14,4 1666 289319 . | |
| lsof 18759 mat cwd DIR 14,4 1666 289319 . |
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
| require "bundler/gem_tasks" | |
| require 'rspec/core/rake_task' | |
| RSpec::Core::RakeTask.new('spec') | |
| # If you want to make this the default task | |
| task :default => :spec |