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 Markdown = require('markdown').markdown.Markdown; | |
| var MyDialect = Markdown.subclassDialect(Markdown.dialects.Gruber); | |
| MyDialect.inline['{'] = function inline_ruby(text, matches, out) { | |
| var m = text.match(/^\{(.+)\|(.+)\}/); | |
| if (m) { | |
| return [m[0].length, ['ruby', m[2], m[1]]]; | |
| } else { | |
| // no match | |
| return [1, '{']; | |
| } |
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
| protected delegate void OnResponse(string error, string body); | |
| protected void Post(string url, Dictionary<string, string> options, OnResponse onResponse) | |
| { | |
| StartCoroutine(PostFlow(url, options, onResponse)); | |
| } | |
| protected IEnumerator PostFlow(string url, Dictionary<string, string> options, OnResponse onResponse) | |
| { | |
| if (options == null) | |
| { |
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 System.Collections; | |
| public class Coro1 : MonoBehaviour { | |
| IEnumerator Task() { | |
| while (true) { | |
| Debug.Log("Coro1"); | |
| yield return new WaitForSeconds(1); | |
| } |
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 ts = require('tail-stream'); | |
| require('http').createServer(function (req, res) { | |
| res.writeHead(200, { | |
| 'Content-Type': 'text/plain' | |
| }); | |
| var stream = ts.createReadStream(req.url.substr(1), { | |
| detectTruncate: true, | |
| onTruncate: 'end', | |
| endOnError: false | |
| }); |
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
| brew install the-silver-searcher | |
| brew install tree | |
| brew install curl | |
| brew install wget | |
| brew install tmux | |
| brew install zsh | |
| brew install zsh-completions | |
| brew install git | |
| brew install boot2docker |
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
| { | |
| "reset":true, | |
| "cursor":"AAHskXVmJSRVG_bgh4Oq2VPQqG79nWM26Tl8jSmRyiGM3M0EGLzi_df861bAJ6q5xzkbQD7WhMTh8cEA2s1GUlDg79gRBPQJ6D5vJvah2sZrBg", | |
| "has_more":false, | |
| "entries":[ | |
| ["/proj1",{"revision":3,"rev":"30ec9923d","thumb_exists":false,"bytes":0,"modified":"Wed, 20 Mar 2013 05:58:43 +0000","path":"/proj1","is_dir":true,"icon":"folder_app","root":"app_folder","size":"0 bytes"}], | |
| ["/proj1/current",{"revision":6,"rev":"60ec9923d","thumb_exists":false,"bytes":0,"modified":"Wed, 20 Mar 2013 05:58:48 +0000","path":"/proj1/current","is_dir":true,"icon":"folder_app","root":"app_folder","size":"0 bytes"}], | |
| ["/proj1/backup",{"revision":9,"rev":"90ec9923d","thumb_exists":false,"bytes":0,"modified":"Wed, 20 Mar 2013 05:58:59 +0000","path":"/proj1/backup","is_dir":true,"icon":"folder_app","root":"app_folder","size":"0 bytes"}], | |
| ["/proj1/current/test.txt",{"revision":12,"rev":"c0ec9923d","thumb_exists":false,"bytes":34,"modified":"Wed, 20 Mar 2013 06:10:51 +0000","client_mtime":"Wed, 20 Mar 2013 06:10:4 |
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
| /* package.json | |
| { | |
| "name": "photo", | |
| "version": "0.0.0", | |
| "description": "ERROR: No README.md file found!", | |
| "main": "index.js", | |
| "scripts": { | |
| "test": "echo \"Error: no test specified\" && exit 1" | |
| }, | |
| "dependencies": {"shelljs":"*", "underscore.string": "*"}, |
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 cluster = require('cluster'); | |
| if (cluster.isMaster) { | |
| for (var i = 0; i < 4; ++i) { | |
| cluster.fork(); | |
| } | |
| } else { | |
| console.log(process.pid, cluster.worker.id); | |
| } |
NewerOlder