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
{ | |
"id": "/en/fantastic_mr_fox_2007", | |
"key": { | |
"namespace": "/source/fandango/movie", | |
"value": "fantasticmr.fox_109297nu", | |
"connect": "insert" | |
} | |
} |
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
== Sinatra/0.9.4 has taken the stage on 4567 for development with backup from WEBrick | |
[2009-11-27 21:02:36] INFO WEBrick 1.3.1 | |
[2009-11-27 21:02:36] INFO ruby 1.9.1 (2009-07-16) [i486-linux] | |
[2009-11-27 21:02:41] INFO WEBrick::HTTPServer#start: pid=7040 port=4567 | |
^C | |
== Sinatra has ended his set (crowd applauds) | |
[2009-11-27 21:02:45] INFO going to shutdown ... | |
[2009-11-27 21:02:45] INFO WEBrick::HTTPServer#start done. | |
[2009-11-27 21:02:45] INFO WEBrick 1.3.1 | |
[2009-11-27 21:02:45] INFO ruby 1.9.1 (2009-07-16) [i486-linux] |
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
$remove = array(); | |
foreach($company_names as $company_name) { | |
$remove_name = false; | |
foreach($company_names as $compare) {$remove_name = $remove_name || (strpos($compare, $company_name) == 0);} | |
if ($remove_name) {$remove[] = $company_name;} | |
} | |
$company_names = array_diff($company_names, $remove); |
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
no |
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
<?php | |
namespace ynd\thsx\core; | |
class Router { | |
protected $prefix; | |
protected $routes; | |
// Used in specificity calculations. | |
const MAX_PATH_SEGMENTS = 10; | |
public function __construct($routes, $prefix = NULL) { |
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
$Locations_from_line = | |
array_map( | |
function($loc) { | |
return array_map( | |
function($part) {return trim($part);}, | |
explode(',', $loc) | |
); | |
}, | |
explode(';', $line['VC Portfolio URL']) | |
); |
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
class BusinessUnit | |
include Mongoid::Document | |
field :name, :type => String | |
embeds_many :users | |
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
= semantic_form_for @user do |form| | |
= form.inputs do | |
= form.input :name, :label => 'Name' | |
= form.input :business_unit | |
= form.buttons |
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
LazyStruct.new({:a=>1, :b => 2}).a # => 2 | |
# That's wrong. Why? |
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 flymake handler for ruby-mode files | |
;;; | |
;;; Author: Steve Purcell | |
;;; Homepage: http://github.com/purcell/emacs.d/blob/master/site-lisp/flymake-ruby/flymake-ruby.el | |
;;; | |
;;; Usage: | |
;;; (require 'flymake-ruby) | |
;;; (add-hook 'ruby-mode-hook 'flymake-ruby-load) | |