Skip to content

Instantly share code, notes, and snippets.

'use strict';
const util = require('util');
const setTimeoutPromise = util.promisify(setTimeout);
const X = 5000; // ms
function createCallBuffer(functionToCallForEachBuffer) {
const callBuffer = [];
let timeout;
@Vunovati
Vunovati / .gitignore
Last active February 21, 2020 12:02
Blog post - jsonl streams
node_modules
@Vunovati
Vunovati / machine.js
Created January 23, 2020 12:53
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions

Keybase proof

I hereby claim:

  • I am vunovati on github.
  • I am vunovati (https://keybase.io/vunovati) on keybase.
  • I have a public key ASClncqC62C0eaXB3BD41d55YLZE4mon2DzlDJ2G4MwFKQo

To claim this, I am signing this object:

@Vunovati
Vunovati / gist:4e68277d6c5b79b445bb
Created July 20, 2015 09:02
Extract json from file and lint it
jsonlint <(sed -n '/^{/,/^}/p' filename | sed 's/^}/},/g')
@Vunovati
Vunovati / gist:7005022
Created October 16, 2013 09:22
Perform action on each file
for i in $(ls delivery/**/**tar.gz); do echo $i; done
@Vunovati
Vunovati / gist:6841932
Created October 5, 2013 14:58
Get yum working on Fedora 14 in lxc
$ curl -o fedora-release-14-1.noarch.rpm ftp://ftp.pbone.net/mirror/archive.fedoraproject.org/fedora/linux/releases/14/Fedora/i386/os/Packages/fedora-release-14-1.noarch.rpm
$ rpm -i fedora-release-14-1.noarch.rpm
@Vunovati
Vunovati / gist:6422481
Created September 3, 2013 11:04
Dynamic java home
export JAVA_HOME=$(dirname $(dirname $(readlink -f /usr/bin/java)))
@Vunovati
Vunovati / gist:6173141
Created August 7, 2013 11:08
Oracle java download oneliner
wget --no-cookies \
--header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com" \
"http://download.oracle.com/otn-pub/java/jdk/7/jdk-7-linux-x64.tar.gz" \
-O /tmp/jdk-7-linux-x64.tar.gz --no-check-certificate
@Vunovati
Vunovati / gist:5790012
Created June 15, 2013 23:28
Ruby: Build Rails project on CI
gem install --conservative bundler
bundle check || bundle install
bundle exec rake db:migrate
bundle exec rake db:test:prepare
bundle exec rspec spec