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
# Helper class for importing files with records to the database. | |
class SeedFile | |
def self.import(path) | |
new(path).import | |
end | |
attr_reader :path | |
def initialize(path) | |
@path = Pathname(path) |
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/lib/importer/wesabe.rb b/lib/importer/wesabe.rb | |
index 2b1e348..fc4b69d 100644 | |
--- a/lib/importer/wesabe.rb | |
+++ b/lib/importer/wesabe.rb | |
@@ -418,7 +418,8 @@ class Importer | |
when false, nil | |
# nothing to do | |
else | |
- if transfer = txactions[datum['transfer']['id']][0] | |
+ transfer, = txactions[datum['transfer']['id']] |
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
#!/usr/bin/env ruby | |
require 'optparse' | |
begin | |
require 'open4' | |
rescue LoadError => ex | |
begin | |
require 'rubygems' | |
require 'open4' | |
rescue LoadError |
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 s -d "Easy spec running" | |
if grep -q "Rspec.configure" spec/spec_helper.rb | |
echo "rspec2!" | |
if test -z "$argv" | |
rspec -fs -c spec | |
else | |
rspec -fs -c $argv | |
end | |
else | |
echo "rspec1!" |
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
serve.js: serve.jsnext.js | |
babel serve.jsnext.js -o serve.js |
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
This is really more about the blog in general. After reading a number of the blog articles, particularly http://blog.tsa.gov/2010/11/tsa-myth-or-fact-leaked-images.html, it seems that you guys are completely ignoring the comments on the blog. I get that. Most of them are really angry. I would hate my job if it involved trying to respond to all these people, many of whom won't listen to a thing you say. | |
Here's the problem: it looks bad, and is just making things worse. Though I'm sure this would be perceived negatively, I'd suggest turning off comments on the blog altogether. People have their own blogs and the can and do comment on your articles there. It raises the bar a bit so you end up with much fewer "TSA SUCKS" comments. | |
If you don't want to do that, then you'll have the bite the bullet and actually engage with people. Not all of them, and perhaps not individually, but address the major concerns. For example, on http://blog.tsa.gov/2010/11/tsa-has-not-will-not-and-our-advanced.html the title explicitl |
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
@import <AppKit/CPView.j> | |
@implementation CPView (sizeToFit) | |
- (void)sizeToFit | |
{ | |
[self sizeToFitWithInset:[self hasThemeAttribute:@"content-inset"] && [self currentValueForThemeAttribute:@"content-inset"] || CGInsetMakeZero()]; | |
} | |
- (void)sizeToFitWithInset:(CGInset)inset |
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
#!/usr/bin/env node | |
/** | |
* Capture or replay responses from an HTTP server. | |
*/ | |
var sys = require('sys'), | |
path = require('path'), | |
args = process.argv.slice(2), |
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
@implementation CPObject (CPCodingExtensions) | |
- (void)setValue:(id)aValue forKey:(CPString)aKey ignoreUndefinedKey:(BOOL)ignoreUndefinedKey | |
{ | |
if (!ignoreUndefinedKey) | |
{ | |
[self setValue:aValue forKey:aKey]; | |
} | |
else | |
{ |
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
/* | |
* AppController.j | |
* CPTableViewRetargetedDropBug | |
* | |
* Created by You on April 11, 2011. | |
* Copyright 2011, Your Company All rights reserved. | |
*/ | |
@import <Foundation/CPObject.j> |