-
Data Down / Actions Up
- http://emberjs.jsbin.com/nayaho/edit?html,js - Interdependent select boxes. No observers.
- http://ember-twiddle.com/2d7246875098d0dbb4a4 - One Way Input
-
Plain JSBin's
-
Ember Version Base JSBin's
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 urllib.request as request | |
from urllib.error import HTTPError | |
import json | |
class YggAuth: | |
def __init__(self, | |
client_token=None, | |
access_token=None, | |
username=None, | |
password=None |
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/libexec/java_home -X | |
$ sudo opensnoop -n java_home | |
UID PID COMM FD PATH | |
501 79809 java_home 3 /System/Library/PrivateFrameworks/JavaLaunching.framework/Versions/A/JavaLaunching | |
501 79809 java_home 3 /dev/dtracehelper | |
501 79809 java_home 4 /System/Library/CoreServices/SystemVersion.bundle//English.lproj | |
501 79809 java_home -1 /System/Library/CoreServices/SystemVersion.bundle//Base.lproj | |
501 79809 java_home 4 /System/Library/CoreServices/SystemVersion.bundle/English.lproj/SystemVersion.strings | |
501 79809 java_home -1 /System/Library/CoreServices/SystemVersion.bundle/English.lproj/SystemVersion.stringsdict | |
501 79809 java_home 3 /usr/share/icu/icudt51l.dat |
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
var Promise = require('bluebird'); | |
var promiseWhile = function(condition, action) { | |
var resolver = Promise.defer(); | |
var loop = function() { | |
if (!condition()) return resolver.resolve(); | |
return Promise.cast(action()) | |
.then(loop) | |
.catch(resolver.reject); |
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
@Grab( 'com.bloidonia:groovy-common-extensions:0.5.5' ) | |
@Grab('com.xlson.groovycsv:groovycsv:1.0') | |
import static com.xlson.groovycsv.CsvParser.parseCsv | |
import groovy.transform.* | |
// A bufferedReader with some output | |
@InheritConstructors | |
class SpinnerReader extends BufferedReader { | |
private String output = '/-\\|' | |
private int offset = 0 |
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 com.sun.tools.attach.AgentInitializationException; | |
import com.sun.tools.attach.AgentLoadException; | |
import com.sun.tools.attach.AttachNotSupportedException; | |
import com.sun.tools.attach.VirtualMachine; | |
import java.io.File; | |
import java.io.FileOutputStream; | |
import java.io.IOException; | |
import java.lang.management.ManagementFactory; | |
import java.lang.management.RuntimeMXBean; |
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
var IntervalLoop = function (arrData, looper, delay) { | |
if (!(this instanceof IntervalLoop)) | |
return new IntervalLoop (arrData, looper, delay); | |
/** | |
* Status | |
* @type Number | |
* 0: 循环未开始 | |
* 1: 正在循环 | |
* 2: 循环结束 |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
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
// Replacement module for Standalone Input Module | |
// Up to date for Unity 4.6 beta 19 | |
// | |
// Usage: | |
// -Remove the standalone module from your event system | |
// -Add this instead | |
// -Include ExtraMouseEvents.cs and IExtraMouseEventsHandler.cs | |
// -Implement IRightPointerClickHandler, IRightPointerDownHandler, IRightPointerUpHandler, IMiddlePointerClickHandler, | |
// IMiddlePointerDownHandler and/or IMiddlePointerUpHandler. | |
// |
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
using UnityEngine; | |
using UnityEngine.EventSystems; | |
public static class ExtraMouseEvents | |
{ | |
/// <summary> | |
/// Right mouse-click | |
/// </summary> | |
/// <param name="handler">Handler.</param> | |
/// <param name="data">Data.</param> |