Skip to content

Instantly share code, notes, and snippets.

gurjeet / bet-on-coin-flip.markdown
Created December 2, 2017 15:45
Bet on Coin Flip
gurjeet / main.go
Last active September 22, 2022 05:43
Protect gorilla/mux Subroute with basic auth
package main
* This Gist and it's other versions are from:
import (
gurjeet / _my_golang_script.go
Last active March 14, 2022 01:28
GoLang Scripting
//usr/bin/env true; go run `dirname $0`/*.go "$@"; exit $?
package main
import (
// TODO: catch Panics and emit a clear message
func main() { os.Exit(mainWithExitCode()) }
gurjeet /
Created April 9, 2020 07:03
D3.js: click on TEXT node in SVG graph to edit its contents
  • Editable -> SVG foreignObject + XHTML

Showcases using a SVG foreignObject to contruct temporary, minimal forms to allow editing of arbitrary D3 data (in this case: titles and subtitles)

** Notes

The code isn't the cleanest that could be: the 'blur' and 'keypress' event handlers share copy&pasted code which could be refactored.

gurjeet / sshd.go
Created January 3, 2017 22:32 — forked from nictuku/sshd.go
Go SSH server complete example
package main
import (
gurjeet /
Created September 11, 2019 17:58

Keybase proof

I hereby claim:

  • I am gurjeet on github.
  • I am gurjeetsingh ( on keybase.
  • I have a public key ASDc68G3ePw0YBtaenpCM49R5kMCqTOBvIUwGiDlxl-xoAo

To claim this, I am signing this object:

gurjeet / index.html
Last active February 26, 2018 03:23
Vertical Bar Chart with Negative Values
Visit the following URL to see the rendered HTML:
<!DOCTYPE html>
<title>Barchart Demo</title>

Setting up Crashplan on FreeNAS Goals

Be able to backup from the FreeNAS box to offsite Crashplan Central. Allow incoming Crashplan backups from other devices. Install the CrashPlan plugin

Install the plugin into a jail: Click on Plugins, then the Available tab, the "crashplan" line and finally the Install button. Once the installation completes, on the left tree, expand Plugins and click on CrashPlan. Accept the Java EULA. Start the Crashplan plugin: Plugins->Installed and make sure the Crashplan plugin is in the "ON" position.

gurjeet / history
Created October 26, 2013 06:49
Radua/liquidsoap VM's history and config file
1 top -c -d 1
2 cd
3 top -c -d 1
4 ping
5 ifconfig
6 sudo apt-get install icecast2
7 sudo apt-get remove icecast2
8 sudo apt-get install icecast2
9 sudo apt-get install liquidsoap
10 man iceauth
gurjeet / Dockerfile
Last active December 23, 2015 23:19
Two consecutive runs of `docker build .` use different caches!
FROM ubuntu
# Update the software repositories
RUN apt-get update
# Install package for lsb_release binary
RUN apt-get install -y lsb-release
# Install package that provides add-apt-repository
RUN apt-get install -y python-software-properties