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
#!/usr/bin/env ruby | |
identifying_attrs = { | |
updateable_type: 'Contact', | |
updateable_id: 123, | |
external_source_id: 123, | |
attribute_name: 'title' | |
} | |
non_identifying_attrs = { |
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
#!/usr/bin/env ruby -wKU | |
require "fileutils" | |
require "pty" | |
unless ARGV.length == 3 | |
STDERR.puts "USAGE: run-test-script <app bundle> <test script> <output directory>" | |
exit 1 | |
end |
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
Loading site data... | |
Compiling site... | |
+--- /!\ ERROR /!\ -------------------------------------------+ | |
| An exception occured while running nanoc. If you think this | | |
| is a bug in nanoc, please do report it at | | |
| <http://projects.stoneship.org/trac/nanoc/newticket> -- | | |
| thanks in advance! | | |
+-------------------------------------------------------------+ |
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
#!/usr/bin/env macruby -wKU | |
framework 'CoreData' | |
def dump_mom(mom_path, out) | |
mom = NSManagedObjectModel.alloc.initWithContentsOfURL(mom_path) | |
mom.entities.sort_by {|e| e.name}.each do |entity| | |
out.puts "-" * 80 | |
out.puts entity.name |
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
Cocoa Is My Girlfriend — http://www.cimgf.com | |
Cocoa with Love — http://cocoawithlove.com/ | |
Mac Developer Network Blog — http://www.mac-developer-network.com | |
Matt Legend Gemmell's Blog — http://mattgemmell.com | |
Mobile Orchard — http://www.mobileorchard.com |
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
#!/usr/bin/env ruby | |
require "rubygems" | |
require "rubygems/command_manager" | |
cm = Gem::CommandManager.instance | |
commands = cm.instance_variable_get(:@commands).keys.map { |c| cm[c.to_s] } | |
commands.sort_by{ |c| c.command }.each do |command| | |
options = command.instance_variable_get(:@option_groups) |
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
#compdef gem gem1.9 | |
gem_general_flags=("(-h --help)"{-h,--help}"[Get help on this command]" | |
"(-V --verbose)"{-V,--verbose}"[Set the verbose level of output]" | |
"(-q --quiet)"{-q,--quiet}"[Silence commands]" | |
"--config-file[Use this config file instead of default]:file:_files" | |
"--backtrace[Show stack backtrace on errors]" | |
"--debug[Turn on Ruby debugging]" | |
$nul_arg | |
) |
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
= Technical Interviews: Epic Fail for Everyone | |
== Description | |
The standard technical interview process is failing both employers and candidates. | |
They prevent each party from effectively evaluating each other and often turn away | |
qualified candidates. This talk will highlight the flaws of technical interviews and | |
present ideas to radically improve them for everyone. | |
== Abstract | |
Let's face it: we all hate the interviewing process, whether we are asking or | |
answering the questions. Technical interviews often devolve into solving absurd |
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
# SOLUTION: just use the StringIO class and replace Kernel#rand with a fixture method. We're | |
# not interested in testing how rand works so explicitly setting the value is fine. | |
class Quiz | |
def initialize(input = STDIN, output = STDOUT) | |
@input = input | |
@output = output | |
end | |
def problem | |
first = rand(10) |
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
(if (equal system-type 'darwin) | |
(progn | |
(setq one-buffer-one-frame nil) | |
(cua-mode 0) | |
(setq mac-command-modifier 'meta) | |
(setq x-select-enable-clipboard t) | |
(set-variable 'default-buffer-file-coding-system 'mac-roman-unix) | |
(set-default-coding-systems 'mac-roman-unix) | |
(set-selection-coding-system 'mac-roman) | |
(set-keyboard-coding-system 'mac-roman) |
NewerOlder