Skip to content

Instantly share code, notes, and snippets.

View kiddkai's full-sized avatar
👋

zekai kiddkai

👋
  • Atlassian
  • Sydney
  • 20:36 (UTC +11:00)
View GitHub Profile
#include "uv.h"
#include <iostream>
#include <memory>
#include <mutex>
#include <optional>
#include <semaphore>
#include <thread>
#include <unistd.h>
#include <vector>
@kiddkai
kiddkai / nash.md
Last active October 29, 2016 12:42

CLI

nash --env-file $(pwd)/foo.senv -- printenv

senv

Normal env file support.

PORT=80
struct sigaction {
union __sigaction_u __sigaction_u; /* signal handler */
sigset_t sa_mask; /* signal mask to apply */
int sa_flags; /* see signal options below */
};
pub unsafe fn sigaction(signal: Signal, sigaction: &SigAction) -> Result<SigAction>
@kiddkai
kiddkai / signal.js
Created October 6, 2016 13:26
Node signal
process.on('SIGINT', () => console.log('I captures sigint'))
process.on('SIGTERM', () => console.log('I captures sigterm'))
sudo /Applications/Install\ OS\ X\ El\ Capitan.app/Contents/Resources/createinstallmedia --volume /Volumes/osx --applicationpath /Applications/Install\ OS\ X\ El\ Capitan.app --nointeraction
@kiddkai
kiddkai / currying.js
Created September 27, 2013 07:13
curry
/**
* curry
*
* var curried = curry(function(a, b, c) {
* console.log(a+b+c);
* });
*
*
* curried(2)(2)(2); // => 6
* curried(2,2)(2); // => 6