Skip to content

Instantly share code, notes, and snippets.

doing codes

Daniel Compton dan-compton

doing codes
View GitHub Profile
View Jsonnet.g4
grammar Jsonnet;
: expr EOF
: value=(NULL | TRUE | FALSE | SELF | DOLLAR | STRING | NUMBER ) # Value
| '(' expr ')' # Parens
| '{' objinside? '}' # Object
fawkesley /
Last active Nov 30, 2019
In Ubuntu 16.04, randomize WiFi MAC addresses with a daily rotation - /etc/NetworkManager/dispatcher.d/pre-up.d/
# /etc/NetworkManager/dispatcher.d/pre-up.d/
# > curl -L '' |sudo tee /etc/NetworkManager/dispatcher.d/pre-up.d/
# > sudo chmod +x /etc/NetworkManager/dispatcher.d/pre-up.d/
# Configure every saved WiFi connection in NetworkManager with a spoofed MAC
brendanzab /
Last active May 16, 2020
A reading list that I'm collecting while building my Rust ES+CQRS framework:

Functional, Reactive, and Distributed Systems Bibliography


wvengen /
Created Nov 25, 2016
wifi export for network-manager
#!/usr/bin/env python
# Export network-manager WiFi connection details to a wpa-supplicant
# file. This can be saved to an Android device, so you have all your
# laptop's WiFi connections on your phone right away (root required).
# python >foo
# adb push foo /sdcard/foo
# adb shell
# su -c 'cat /sdcard/foo >>/data/misc/wifi/wpa_supplicant.conf'
import sys
import os
import xml.etree.ElementTree as ET
import logging
import re
from shutil import copyfile
from optparse import OptionParser
### This file came from the repo they were nice enough to spend time to write this.
### It is copied here for other people to use on its own.
bsphere / timestamp.go
Last active Jul 10, 2020
UNIX timestamps in Golang
View timestamp.go
package timestamp
import (
type Timestamp time.Time
noteed /
Last active Apr 17, 2019
Docker - Tinc setup

Running Docker on two hosts, bridged with Tinc

This Gist is similar to which uses Open vSwitch instead of Tinc.


Download the script and run it:

insin / gulpfile.js
Last active Sep 15, 2016
gulpfile for use with React, with flat imports from uniquely-named modules under /src
View gulpfile.js
gulpfile from one of my React applications which has a gulp --production build
set up.
1. All your own .js/.jsx modules are somewhere under ./src, have unique
filenames and use Node.js-style requires WITHOUT any path information, just
the name of another module somewhere under ./src
pedronauck / gulpfile.js
Created Jan 13, 2014
A sample gulp file to using in many projects
View gulpfile.js
var gulp = require('gulp'),
pkg = require('./package.json'),
path = require('path'),
connect = require('connect'),
http = require('http'),
open = require('open'),
compass = require('gulp-compass'),
howeyc / s3dl.go
Created Nov 14, 2013
Download an s3 bucket.
View s3dl.go
// Download a public s3 bucket.
// Relies on the directory listing being public.
// Example usage:
// s3dl -bucket <bucketName>
// -> Will download all files in the "<bucketName>" s3 bucket
// to "<bucketName>" folder.
package main
You can’t perform that action at this time.