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;
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 Nov 30, 2019
In Ubuntu 16.04, randomize WiFi MAC addresses with a daily rotation - /etc/NetworkManager/dispatcher.d/pre-up.d/randomize-mac-addresses.sh
View 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 May 16, 2020
A reading list that I'm collecting while building my Rust ES+CQRS framework: https://github.com/brendanzab/chronicle
View reactive_systems_bibliography.md

Functional, Reactive, and Distributed Systems Bibliography

Books

@wvengen
wvengen / gen_wpa_sup.py
Created Nov 25, 2016
wifi export for network-manager
View gen_wpa_sup.py
#!/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'
View merge-xml-coverage.py
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 Jul 10, 2020
UNIX timestamps in Golang
View timestamp.go
package timestamp
import (
"fmt"
"labix.org/v2/mgo/bson"
"strconv"
"time"
)
type Timestamp time.Time
@noteed
noteed / docker-tinc.md
Last active Apr 17, 2019
Docker - Tinc setup
View docker-tinc.md

Running Docker on two hosts, bridged with Tinc

This Gist is similar to https://gist.github.com/noteed/8656989 which uses Open vSwitch instead of Tinc.

Setup

Download the install.sh script and run it:

> https://gist.githubusercontent.com/noteed/11031504/raw/install.sh
@insin
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.
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 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
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.