Skip to content

Instantly share code, notes, and snippets.

fghhfg / GitHub
Created March 19, 2018 19:02 — forked from Integralist/GitHub
Download a single file from a private GitHub repo. You'll need an access token as described in this GitHub Help article:
View GitHub
curl --header 'Authorization: token INSERTACCESSTOKENHERE' \
--header 'Accept: application/vnd.github.v3.raw' \
--remote-name \
# Example...
fghhfg / diigo-oneclick-bookmarklet.js
Last active January 21, 2018 03:03 — forked from avivo/diigo-oneclick-bookmarklet.js
A bookmarklet to make a diigo bookmark with a default tag with one click.
View diigo-oneclick-bookmarklet.js
var path = '';
var params = {
'url': document.URL,
'title': document.title,
'tags': 'oneclick',
'shared': 'no'
fghhfg /
Created November 12, 2017 14:38 — forked from jashmenn/
Javascript var self = this; vs. .bind

The Problem

In Javascript this is bound in unexpected ways. Functions, in particular, create a new 'this' and so when you want to keep a reference to an "outer" object you sometimes see the pattern:

var self = this;

as in:

var self = this;
fghhfg /
Last active May 2, 2016 17:50 — forked from mikesmullin/
watch is a linux bash script to monitor file modification recursively and execute bash commands as changes occur
#!/usr/bin/env bash
# script: watch
# author: Mike Smullin <>
# license: GPLv3
# description:
# watches the given path for changes
# and executes a given command when changes occur
# usage:
# watch <path> <cmd...>