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
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 |
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 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 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 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 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 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
// Interpolates through 10 RGB values, given a value and its domain | |
colorGradientCalculator = function (stdlib, foreign, heap) { | |
"use asm"; | |
var rgb = new stdlib.Uint8Array(heap); | |
var imul = stdlib.Math.imul; | |
var floor = stdlib.Math.floor; | |
var lowIndex = 0; | |
var partial = 0.0; |
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
// Generated .IDL file (by the OLE/COM Object Viewer) | |
// | |
// typelib filename: VWorksCPPATL.dll | |
[ | |
uuid(83ED4BB2-4E00-4349-AD9E-493801A0FC62), | |
version(1.0), | |
custom(DE77BA64-517C-11D1-A2DA-0000F8773CE9, 134218331), | |
custom(DE77BA63-517C-11D1-A2DA-0000F8773CE9, 1471199125), | |
custom(DE77BA65-517C-11D1-A2DA-0000F8773CE9, "Created by MIDL version 8.00.0603 at Sun Aug 14 11:25:24 2016 |
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
(* Common: *) | |
ToJSON[x_] := ImportString[FromCharacterCode[x, "Unicode"], "RawJSON"](*Ignore emoji*) | |
getIssues[repo_] := getIssues[repo, "*"] | |
getIssues[repo_, milestone_] := | |
getIssues[repo, milestone] = Block[{url, head, pageCount, issues}, | |
url = URLBuild[{"https://api.github.com/repos", repo, "issues"}, | |
{"state" -> "all", | |
(*"access_token" -> "...",*) (* use for private repos, larger API quota*) | |
"sort" -> "created", |
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
/** | |
* Tool to change styles with dynamic CSS. Use instead of setting style | |
* properties on individual elements. | |
*/ | |
function Styler() { | |
this.styleEl = document.createElement("style"); | |
document.head.appendChild(this.styleEl); | |
// Map for quickly looking up an existing rule by its selector. | |
this.ruleMap = new Map(); | |
} |
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
hoistDotArgs = function(fn) { | |
dotCalls = list() | |
findDotArgs = function(exp) { | |
if (typeof(exp) == "closure") { # entry point | |
expL = as.list(exp) | |
args = names(expL) | |
if (!("..." %in% args)) return(invisible()) # no dots to hoist | |
body = expL[[length(expL)]] | |
findDotArgs(body) |