Skip to content

Instantly share code, notes, and snippets.

View dancompton's full-sized avatar
🌴
On vacation

dancompton dancompton

🌴
On vacation
View GitHub Profile
grammar Jsonnet;
jsonnet
: expr EOF
;
expr
: value=(NULL | TRUE | FALSE | SELF | DOLLAR | STRING | NUMBER ) # Value
| '(' expr ')' # Parens
| '{' objinside? '}' # Object
@fawkesley
fawkesley / randomize-mac-addresses.sh
Last active July 25, 2022 06:24
In Ubuntu 16.04, randomize WiFi MAC addresses with a daily rotation - /etc/NetworkManager/dispatcher.d/pre-up.d/randomize-mac-addresses.sh
#!/bin/sh
# /etc/NetworkManager/dispatcher.d/pre-up.d/randomize-mac-addresses.sh
# INSTALL
#
# > curl -L 'https://gist.github.com/paulfurley/46e0547ce5c5ea7eabeaef50dbacef3f/raw/56ee5dd5f40dec93b8f7438cbdeda5475ea3b5d2/randomize-mac-addresses.sh' |sudo tee /etc/NetworkManager/dispatcher.d/pre-up.d/randomize-mac-addresses.sh
# > sudo chmod +x /etc/NetworkManager/dispatcher.d/pre-up.d/randomize-mac-addresses.sh
# Configure every saved WiFi connection in NetworkManager with a spoofed MAC
@brendanzab
brendanzab / reactive_systems_bibliography.md
Last active October 10, 2022 06:36
A reading list that I'm collecting while building my Rust ES+CQRS framework: https://github.com/brendanzab/chronicle

Functional, Reactive, and Distributed Systems Bibliography

Books

@wvengen
wvengen / gen_wpa_sup.py
Created November 25, 2016 09:56
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 gen_wpa_sup.py >foo
# adb push foo /sdcard/foo
# adb shell
# su -c 'cat /sdcard/foo >>/data/misc/wifi/wpa_supplicant.conf'
@tgsoverly
tgsoverly / merge-xml-coverage.py
Created May 8, 2015 13:12
Merge Cobertura XML's
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 https://github.com/flow123d/flow123d repo they were nice enough to spend time to write this.
### It is copied here for other people to use on its own.
@bsphere
bsphere / timestamp.go
Last active January 23, 2024 02:50
UNIX timestamps in Golang
package timestamp
import (
"fmt"
"labix.org/v2/mgo/bson"
"strconv"
"time"
)
type Timestamp time.Time
@noteed
noteed / docker-tinc.md
Last active April 17, 2019 06:22
Docker - Tinc setup
@insin
insin / gulpfile.js
Last active September 15, 2016 08:35
gulpfile for use with React, with flat imports from uniquely-named modules under /src
/*
gulpfile from one of my React applications which has a gulp --production build
set up.
Assumptions:
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
pedronauck / gulpfile.js
Created January 13, 2014 03:04
A sample gulp file to using in many projects
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
howeyc / s3dl.go
Created November 14, 2013 22:53
Download an s3 bucket.
// 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