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.prototype.curry = function () { | |
const slice = Array.prototype.slice; | |
const args = slice.apply(arguments); | |
const that = this; | |
return function () { | |
return that.apply(null, args.concat(slice.apply(arguments))); | |
}; | |
}; | |
const fn = (x1, x2, x3) => { |
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/bin/env bash | |
# Remove Android Studio from your macOs | |
dry_run=true | |
while getopts "f" opt; do | |
case $opt in | |
f) | |
dry_run=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
# Generic Makefile with deps for C++ | |
CXX = g++ | |
CXXFLAGS = -std=c++14 -Wall -Wextra -Werror -pedantic-errors \ | |
-Wno-unused-const-variable -Wno-missing-braces \ | |
-Wfatal-errors -MMD -O0 -g | |
SRC = $(wildcard *.cpp) | |
BIN = $(patsubst %.cpp,%.bin,$(SRC)) | |
OBJ = $(SRC:.cpp=.o) |
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
/** | |
* mocha_runner.js — Simple Mocha Runner for ES6 | |
* | |
* Test your ES6 code with Mocha | |
* | |
* In package.json: "test": "babel-node run_mocha.js" | |
* | |
* Written by Misha Tavkhelidze <[email protected]> | |
* | |
* Copyright (c) 2016 Misha Tavkhelidze |
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
/*eslint no-console: 0*/ | |
/** | |
Poor man's Google Analytics webtask.io Task. | |
Written by Misha Tavkhelidze | |
*/ | |
'use strict'; | |
var mongo = require('mongodb').MongoClient; |
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 <dlfcn.h> | |
static off_t lookupPrivateSymbol(const char *path, const char *symbol) | |
{ | |
// TODO: Parse the Mach-O file | |
NSTask *task = [[NSTask alloc] init]; | |
task.launchPath = @"/usr/bin/nm"; | |
task.arguments = @[@"-a", @(path)]; | |
NSPipe *outputPipe = [NSPipe pipe]; | |
task.standardOutput = outputPipe; |
NewerOlder