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 http = require('http'); | |
var server = http.createServer(function (req, res) { | |
req.connection.unref(); console.log("Got request. Connection unref'ed again"); | |
res.writeHead(200, {"Content-Type": "text/plain"}); | |
setTimeout(function () { | |
console.log("Handler timeout invoked"); | |
res.end("Hello", function (err) {; |
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
const cluster = require("cluster"); | |
if (cluster.isMaster) { | |
function messageHandler(msg) { | |
console.log(msg); | |
} | |
cluster.on("message", function (worker, message) { | |
console.log(`master: (cluster.onMessage) '${message}'`); |
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
"use strict"; | |
var MyNS; | |
(function (MyNS) { | |
var Base = (function () { | |
function Base() { | |
} | |
Base.create = function (foo) { | |
return new MyNS[foo.type](); | |
}; | |
return Base; |
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
void Swap32(const FunctionCallbackInfo<Value>& args) { | |
00007FF79E253100 push rbx | |
00007FF79E253102 push rdi | |
00007FF79E253103 sub rsp,28h | |
00007FF79E253107 mov rdi,rcx | |
Environment* env = Environment::GetCurrent(args); | |
00007FF79E25310A call node::Environment::GetCurrent (07FF79E22D240h) | |
THROW_AND_RETURN_UNLESS_BUFFER(env, args[0]); | |
00007FF79E25310F cmp dword ptr [rdi+10h],0 | |
Environment* env = Environment::GetCurrent(args); |
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 query = process.argv[2]; | |
var fs = require('fs'); | |
var path = require("path"); | |
var childProcess = require("child_process"); | |
var SYSTEM_PATHS = [ | |
"/lib", | |
"/usr/lib", | |
"/usr/local/lib", | |
"/opt/local/lib", |
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 demo.pipeline; | |
import java.io.File; | |
import java.io.IOException; | |
import java.io.PrintWriter; | |
import java.io.Serializable; | |
import java.text.SimpleDateFormat; | |
import java.util.Date; | |
import java.util.HashSet; | |
import java.util.LinkedList; |
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
Version 1: | |
5 egg whites ┐ | |
1 whole egg │ | |
0.5 c flour │ combine all and cook | |
1 heaping scoop of vanilla Monster Milk ┘ | |
http://www.bodybuilding.com/store/cs/monstermilk.html | |
Version 2: | |
1 c flour ┐ |
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
function flip() { | |
var flipper = new Uint8Array(4 * 10000); | |
flipFloat(flipper, 10000, 4); | |
} | |
function flipFloat(flipper, iMax, eSize) { | |
for (var i = 0; i < iMax; i += eSize) { | |
var t = flipper[i]; | |
// Toggle this line: | |
if (t === undefined) {} |
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 buf1 = new Buffer(1024); | |
for (var i = 0; i < 1024; i++) { | |
buf1[i] = i | |
} | |
function toArrayBuffer(buffer) { | |
var ab = new ArrayBuffer(buffer.length); | |
var view = new Uint8Array(ab); | |
for (var i = 0; i < buffer.length; ++i) { |
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
puts "in #{Dir.pwd}\n" | |
Dir.entries("app/helpers").each do |file_name| | |
file_path = "#{Dir.pwd}/app/helpers/#{file_name}" | |
puts "Processing #{file_name}\n" | |
unless File.directory?(file_path) | |
spec_file_name = file_name.sub(/\.rb/, "_spec.rb") | |
unless File.file?("spec/helpers/#{spec_file_name}") | |
class_name = nil |