Skip to content

Instantly share code, notes, and snippets.

View kaihendry's full-sized avatar

Kai Hendry kaihendry

View GitHub Profile
var request = require('request');
var async = require('async');
var faker = require('faker');
var _ = require('lodash');
if (!process.env.PEAK_PERIOD_MINS) {
process.env.PEAK_PERIOD_MINS = '30';
}
var PEAK_PERIOD_MINS = parseInt(process.env.PEAK_PERIOD_MINS, 10) * 60 * 1000;
var MAX_CONCURRENT = parseInt(process.env.MAX_CONCURRENT, 10) || 100;
@brunoamaral
brunoamaral / copyright.html
Created May 31, 2020 09:24
Automatic Unsplash Copyright Shortcode for Hugo
@marcoscaceres
marcoscaceres / webshare.md
Last active August 24, 2020 01:38
How we implemented web share

How we implemented Web Share

Written by: Marcos Cáceres Technical reviewers: Kagami Sascha Rosylight, Sid Vishnoi.

This post describes how we implemented the Web Share API in Gecko, which is exposed as a DOM API to the Web. As it can be challenging to know how to implement new features in Gecko, it's intended to serve as a reference guide for other Gecko developers who need to implement similar DOM APIs in the future. For the impatient, the final implementation is available in Phabricator.

Before you start - some general advice about how things work

The following subsections give some general advice about what you should expect as you embark on implementing a new DOM feature.

@NickSto
NickSto / gist:6920790
Last active July 11, 2017 15:44 — forked from rnorth/gist:2031652
Cookie-based authentication with nginx
worker_processes 1;
error_log logs/error.log;
events {
worker_connections 1024;
}

#GoPro HERO4 Black Wifi Hacking, ep 2

By Maelstrom Napalm, @odwdinc and Konrad Iturbe

###Status URL:

http://10.5.5.9/gp/gpControl/status

####Protune EV compensation: Value | URL

@ElectronicRU
ElectronicRU / dmenu_history.sh
Last active December 14, 2015 19:48
dmenu script for providing unlimited history sorted by number of uses/most recent use.
#!/bin/sh
if [ $# -lt 1 ] ; then
echo 1>&2 "usage: dmenu_history hist_file dmenu_opts..."
exit 1
fi
f="$1"
tf=`mktemp`
if ! [ -e "$f" ]; then touch "$f"; fi
shift
( sort -r -k 1,1 -n -s "$f" | cut -d' ' -f2- ; cat - ) | dmenu "$@" |
@kaihendry
kaihendry / gist:3170423
Created July 24, 2012 14:53
This works well
x220:/srv/www/greptweet$ cat foo.cgi
#!/bin/bash
exec 2>&1
cat <<END
Cache-Control: no-cache
Content-Type: text/html
END
./foo-script.sh & disown