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 fs = require('fs'); | |
var Pipe = require('./core').Pipe; | |
var getStatAndWriteToJSONFile = Pipe.create(function(file,next){ | |
fs.stat(file, next); | |
}).then(function(err, stats, next){ |
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 fs = require('fs'); | |
var Pipe = require('./core').Pipe; | |
var folder = './files/'; | |
var getStatsAndWriteThemToFile = Pipe.create(function(file,pipe){ | |
pipe.set('filename',file); | |
fs.stat(folder + file, pipe.next); |
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 Filesystem = require('./filesystem'); | |
var fs = require('fs'); | |
var pickleHeader = new Buffer([0x04, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00]); | |
var writeFileListToStream = function(out, list, cb) { | |
if (list.length === 0) { | |
out.end(); | |
if ('function' === typeof cb) { | |
cb(null); | |
} |
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
'use strict'; | |
var path = require('path'); | |
var Promise = require('bluebird'); | |
var asar = Promise.promisifyAll(require('asar')); | |
var globAsync = Promise.promisify(require('glob')); | |
var stylus = Promise.promisifyAll(require('stylus')); | |
var fs = Promise.promisifyAll(require('fs-extra')); | |
var readFiles = function(files) { | |
return Promise.map(files, function(file) { |
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() { | |
var url = 'http://127.0.0.1:8000/'; | |
var req = new XMLHttpRequest(); | |
var updateProgress = function(e) { | |
var chunks = req.responseText.split('\n'); | |
var last_chunk = chunks[chunks.length - 1]; | |
if (last_chunk) { | |
console.log(last_chunk); | |
} |
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 CC=llvm-gcc CXX=llvm-g++ |
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
python -m SimpleHTTPServer 8000 |
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
{ | |
"rules": { | |
"indent": [ | |
2, | |
4 | |
], | |
"quotes": [ | |
2, | |
"single" | |
], |
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
require "rack" | |
require "json" | |
use Rack::ContentLength | |
use Rack::Logger, Logger.new(STDOUT) | |
use Rack::Static, :urls => ["/static"] | |
module CacheHolder | |
CACHE = Hash.new | |
LOCK = Mutex.new |
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
extern crate winapi; | |
extern crate user32; | |
use self::winapi::windef::HWND; | |
use self::winapi::minwindef::UINT; | |
use self::winapi::minwindef::DWORD; | |
use self::winapi::minwindef::WPARAM; | |
use self::winapi::minwindef::LPARAM; | |
fn register_hotkey_api_call(key_options: u32, key_code: u32) -> bool { |
OlderNewer