Skip to content

Instantly share code, notes, and snippets.

View milesrichardson's full-sized avatar
👁️
Miles Richardson

Miles Richardson milesrichardson

👁️
Miles Richardson
View GitHub Profile
@ironpillow
ironpillow / README.md
Last active May 10, 2016 21:10 — forked from e7d/README.md
[Debian] Build a Squid transparent proxy from source code
@hsribei
hsribei / can-nat-traversal-be-tor-s-killer-feature.md
Last active July 12, 2018 19:15
Can NAT traversal be Tor's killer feature?

Can NAT traversal be Tor's killer feature?

tl;dr: how about a virtual global flat LAN that maps static IPs to onion addresses?

[We all know the story][1]. Random feature gets unintentionally picked up as the main reason for buying/using a certain product, despite the creator's intention being different or more general. (PC: spreadsheets; Internet: porn; smartphones: messaging.)

@geddski
geddski / create-react-app-for-testing
Created August 30, 2017 20:51
quick way to start testing ES6 code with a real browser (using create-react-app and Jasmine)
create-react-app comes with Jest which is awesome, but sometimes you need a real DOM/browser to test with. Here's a quick way to get up and running testing your app.
1. Create a *separate* app for testing, using create-react-app:
```
create-react-app tests
cd tests
```
2. Modify the index.html to include the Jasmine spec runner (see index.html below)
3. Modify the index.js to just run your tests rather than bootstrap a React app. (see index.js below)
@amberj
amberj / setup-headless-selenium-xvfb.sh
Created September 25, 2013 05:06
Bash script to install/setup headless Selenium (uses Xvfb and Chrome)
#!/bin/bash
#
# Bash script to setup headless Selenium (uses Xvfb and Chrome)
# (Tested on Ubuntu 12.04)
# Add Google Chrome's repo to sources.list
echo "deb http://dl.google.com/linux/chrome/deb/ stable main" | sudo tee -a /etc/apt/sources.list
# Install Google's public key used for signing packages (e.g. Chrome)
# (Source: http://www.google.com/linuxrepositories/)
@noteed
noteed / docker-tinc.md
Last active April 17, 2019 06:22
Docker - Tinc setup
@olavmrk
olavmrk / removeexcept.sh
Last active August 23, 2021 21:33
git filter-branch command to remove all files except those of interest
# Remove every file except "./somefile.txt" and the directory "./somedir".
# --prune-empty to remove empty commits.
git filter-branch --tree-filter "find . -not -path './.git' -not -path './.git/*' -not -path './somefile.txt' -not -path './somedir/*' -not -path './somedir' -delete" --prune-empty
@overplumbum
overplumbum / gist:4473076
Last active March 15, 2022 12:03
OpenVPN server as an LXC container
#!/bin/bash
set -ve
lxc-create -n vpn -t ubuntu
# ln -s /var/lib/lxc/vpn/config /etc/lxc/auto/vpn.conf
perl -i -ple 's/#lxc.aa_profile = unconfined/lxc.aa_profile = unconfined/' /etc/lxc/auto/vpn.conf
perl -i -ple 's/^exit 0/# exit 0/' /etc/rc.local
cat >>/etc/rc.local <<hello
mkdir -p /var/lib/lxc/vpn/rootfs/dev/net/
@vsergeev
vsergeev / beagle_elfs.md
Created April 15, 2012 09:45
Minimalist "Embedded Linux from Scratch" Beaglebone Distribution Build

Busybox "Embedded Linux from Scratch" Distribution for the Beaglebone

Prepare your Build Sandbox

$ mkdir -p beaglelfs/{sources,rootfs_install,boot_mnt,rootfs_mnt}

Acquire an ARM Toolchain

Download the latest i686 Binary TAR of the ARM GNU/Linux (glibc-based) Lite Toolchain:

@corbinbs
corbinbs / json_required_demo.py
Created September 26, 2012 22:57
Flask JSON required decorator
"""
Demo of json_required decorator for API input validation/error handling
"""
import inspect
import functools
import json
from traceback import format_exception
from flask import jsonify, request
import sys
@iddoeldor
iddoeldor / ios_ssh_over_usb_and_ipa_extractor.md
Last active October 16, 2022 05:01
and iOS related tips&tricks

extract db

PASS=alpine; PORT=2222; sshpass -p $PASS ssh -p $PORT root@localhost -t "cp \$(find /var/mobile/Containers/Data/Application/ -name s4l*db) /private/var/tmp/skype.db" && sshpass -p $PASS scp -P $PORT root@localhost:/private/var/tmp/skype.db .

pull & read plist

/tmp$ scp -P 2222 root@localhost:/private/var/mobile/Containers/Data/Application/F8C7294C-2B60-48EC-A987-D46B9FE4DEAE/Library/Preferences/com.skype.skype.plist .
/tmp$ sudo apt-get install libplist-utils
/tmp$ plistutil -i com.skype.skype.plist | less