Skip to content

Instantly share code, notes, and snippets.

View arypurnomoz's full-sized avatar

Ary Purnomoz arypurnomoz

  • Atlas
  • Hangzhou - Tangerang
View GitHub Profile
@kastermester
kastermester / immutable.js
Last active August 29, 2015 14:25
Flowtype definition for immutable.js
declare module "immutable" {
declare class Iterable<K, V> {
static isIterable(maybeIterable: any): boolean;
static isKeyed(maybeKeyed: any): boolean;
static isIndexed(maybeIndexed: any): boolean;
static isAssociative(maybeAssociative: any): boolean;
static isOrdered(maybeOrdered: any): boolean;
toArray(): Array<V>;
toIndexedSeq(): IndexedSeq<V>;
@lloydzhou
lloydzhou / nginx.conf
Last active April 25, 2022 06:02
nginx srcache module to server stale data, using lua-resty-lock to make one request to create new cache, and using "lua-resty-http" + "ngx.timer.at" to update new cache in background.
upstream www {
server 127.0.0.1:9999;
}
upstream redis {
server 127.0.0.1:6379;
keepalive 1024;
}
lua_shared_dict srcache_locks 100k;
server {
@romaninsh
romaninsh / swapon.service
Created December 1, 2014 10:05
Set up swap on CoreOS
create this file in your /root folder
$ fleetctl load swapon.service
$ fleetctl start swapon.service
This will create swap file on all nodes of your CoreOS cluster without prior setup.
See also http://cloudinit.readthedocs.org/en/latest/topics/examples.html#adjust-mount-points-mounted