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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName:'Ember Twiddle' | |
}); |
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 pretender; | |
export function server(dsl) { | |
if (pretender) { | |
dsl.call(pretender); | |
return pretender; | |
} | |
pretender = new Pretender(dsl); | |
pretender.unhandledRequest = function (verb, path, request) { | |
fail("Pretender intercepted "+verb+" "+path+" but no handler was defined for this type of request"); | |
throw new Error("Pretender intercepted "+verb+" "+path+" but no handler was defined for this type of request"); |
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 rimraf = require('rimraf'); | |
var helpers = require('broccoli-kitchen-sink-helpers'); | |
function TeeTree(inputTree, otherDir) { | |
this.inputTree = inputTree; | |
this.otherDir = otherDir; | |
} | |
TeeTree.prototype.read = function (readTree) { | |
var otherDir = this.otherDir; |
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
#define WEAKIFY(x) __weak typeof(x)weak_##x = x | |
#define STRONGIFY(x) __strong typeof(weak_##x)x = weak_##x | |
MyViewController * __block myController = [[MyViewController alloc] init…]; | |
// ... | |
WEAKIFY(myController); | |
myController.completionHandler = ^(NSInteger result) { | |
STRONGIFY(myController); | |
[myController dismissViewControllerAnimated:YES completion:nil]; | |
}; |
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
#include <stdio.h> | |
#include <CoreFoundation/CoreFoundation.h> | |
#include <objc/runtime.h> | |
#include <objc/message.h> | |
#include <ruby.h> | |
#include <ruby/encoding.h> | |
static CFStringRef bundle_identifier = CFSTR("com.apple.finder"); |
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 'io/console' | |
require 'net/https' | |
require 'json' | |
require 'yaml' | |
require 'set' | |
script_name = File.basename($0) | |
$config_file = File.join(Dir.home, ".#{script_name}rc") |
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 xhr = new XMLHttpRequest(); | |
xhr.open('GET', 'http://localhost:3333/www.fnordware.com/superpng/pnggrad8rgb.jpg', true); | |
xhr.responseType = 'blob'; | |
xhr.onload = function(e) { | |
var reader = new FileReader(); | |
reader.onloadend = function() { | |
var img = document.createElement('img'); |
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
#!/bin/sh | |
(for root in $(watchman watch-list | jq -r '.roots | .[]'); do watchman watch-del "$root" ; done) |
OlderNewer