- At Penn Station in NY if you have luggage always ask for a "red cap." Unlike the murderous dwarves of lore, these guys just carry your luggage for you on a cart. The main benefit, however, is that you get to go down on the platform before everyone else, which means no waiting in line, and first pick of seats. Even if you just have a backpack.
- At 30th Street Station in Philly don't bother waiting in the line to go down onto the platform. They almost always open the platform well before the train arrives and you're just gonna be standing around down there anyway.
- Never pay extra for business class on any of the Northeast Regional trains. They basically just exist as extra-fare last minute tickets and the accommodations are identical.
- Conversely, there are certain long distance trains on the east coast (the named trains like the Vermontor or the Palmetto) that are so so so worth the extra charge for business class. Only for trains that have what is known as a "club car" though, which is a combined ca
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
export default function wrapArray(pathToArray, itemController) { | |
return Ember.computed(function () { | |
var content = this.get(pathToArray); | |
return this.container.lookupFactory("controller:array").create({ | |
model: content, | |
parentController: this, | |
itemController: itemController | |
}); | |
}); |
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
export default { | |
name: 'mockjax', | |
initialize: function () { | |
... | |
} | |
}; |
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
var BlankComponent = Ember.Component.extend(); | |
container.register('component:link-to', BlankComponent); | |
var view = Ember.View.createWithMixins({tempalte: Ember.Handlebars.compile('{{#link-li viewName="testComponent"}}{{#link-to viewName="linkToComponent"}}{{/link-to}}{/link-li}}')}); | |
view.get('testComponent') // link-li | |
view.get('testComponent.linkToComponent') // link-to |
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
Ember.autoComputed = function () { | |
var args = Array.prototype.slice(arguments); | |
if (!args.length) return; | |
var func = args.pop(); | |
if (typeof func !== 'function') return; | |
var depKeys = args.slice(0, -1); |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Struct</title> | |
<link rel="stylesheet" href="http://code.jquery.com/qunit/qunit-1.15.0.css"> | |
</head> | |
<body> | |
<div id="qunit"></div> | |
<div id="qunit-fixture"></div> |
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
function _main($0,$1) { | |
$0 = $0|0; | |
$1 = $1|0; | |
var $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; | |
sp = STACKTOP; | |
_swift_once((_globalinit_33_1BDF70FFC18749BAB495A73B459ED2F0_token9|0),(1|0),(0|0)); | |
HEAP32[__TvOSs7Process5_argcVSs5Int32>>2] = $0; | |
_swift_once((_globalinit_33_1BDF70FFC18749BAB495A73B459ED2F0_token10|0),(2|0),(0|0)); | |
HEAP32[__TvOSs7Process11_unsafeArgvGVSs20UnsafeMutablePointerGS0_VSs4Int8__>>2] = $1; | |
$2 = 8; |
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 '[..]/scratch_file.rb' | |
if (file_name = ENV['TM_FILEPATH']) && File.extname(file_name) == ".scratch" | |
ScratchFile.new(file_name).write! | |
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
extension NSView { | |
class func instantiateViewFromNib<T>(named nibName: String, inBundle bundle: NSBundle = NSBundle.mainBundle()) -> T? { | |
var objects : NSArray? | |
if bundle.loadNibNamed(nibName, owner: nil, topLevelObjects: &objects) { | |
if let objects = objects { | |
for object in objects { | |
if let object = object as? T { | |
return object |
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
sessionLength: function(key, value) { | |
if(value !== undefined) { | |
this.writeAttribute('sessionLength', value) | |
} else { | |
var sl = this.readAttribute('sessionLength') ; | |
if(sl > 0) | |
return sl; | |
return '0'; | |
} |