Skip to content

Instantly share code, notes, and snippets.

View stephenemslie's full-sized avatar

Stephen stephenemslie

  • Freelance
  • London
View GitHub Profile
@loganvolkers
loganvolkers / Byte Formatting for Google Sheets.md
Last active November 16, 2024 20:13
Byte formatting for Google Sheets
@unoexperto
unoexperto / patch_apk_for_sniffing.md
Last active September 29, 2024 16:13
How to patch Android app to sniff its HTTPS traffic with self-signed certificate

How to patch Android app to sniff its HTTPS traffic with self-signed certificate

  • Download apktool from https://ibotpeaches.github.io/Apktool/
  • Unpack apk file: java -jar /home/expert/work/tools/apktool.jar d [email protected]
  • Modify AndroidManifest.xml by adding android:networkSecurityConfig="@xml/network_security_config" attribute to application element.
  • Create file /res/xml/network_security_config.xml with following content:
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
    <base-config>
@montanaflynn
montanaflynn / concurrency.go
Last active October 26, 2023 13:35
A simple example of bounded concurrency and wait groups in Golang
package main
import (
"fmt"
"sync"
"time"
)
func main() {
@efrecon
efrecon / run.tpl
Last active November 12, 2024 10:10
`docker inspect` template to regenerate the `docker run` command that created a container
docker run \
--name {{printf "%q" .Name}} \
{{- with .HostConfig}}
{{- if .Privileged}}
--privileged \
{{- end}}
{{- if .AutoRemove}}
--rm \
{{- end}}
{{- if .Runtime}}
@maxcnunes
maxcnunes / alias-docker-compose.sh
Last active August 27, 2023 15:11
Aliases for docker-compose
alias c='docker-compose'
alias cb='docker-compose build'
alias cup='docker-compose up'
alias cr='docker-compose run --service-ports --rm'
alias crl='docker-compose run --service-ports --rm local'
alias crd='docker-compose run --service-ports --rm develop'
alias crt='docker-compose run --rm test'
alias crp='docker-compose run --rm provision'
alias crci='docker-compose run --rm ci'
alias crwt='docker-compose run --rm watchtest'
@nikhan
nikhan / gist:db148ad236f485fce806
Last active July 14, 2020 04:53
Share Whatever over Google Tone
// send whatever message you want over Google Tone
// as far as I can tell, profile images must live on googleusercontent.com
// data.url must look like a url
// setting AUDIBLE_DURATION to 1 will generate no audible sound but result in a successful transmission.
//
// to use:
// 0. install Google Tone https://chrome.google.com/webstore/detail/google-tone/nnckehldicaciogcbchegobnafnjkcne
// 1. open settings > extentions
// 2. click "options" under Google Tone
// 3. In the Google Tone options, open the developer console and paste the following
@d11wtq
d11wtq / docker-ssh-forward.bash
Created January 29, 2014 23:32
How to SSH agent forward into a docker container
docker run -rm -t -i -v $(dirname $SSH_AUTH_SOCK) -e SSH_AUTH_SOCK=$SSH_AUTH_SOCK ubuntu /bin/bash
@flyte
flyte / fake_swipe.py
Last active December 30, 2015 06:09
Fake a "swipe" UDP packet from a network based RFID reader by spoofing the source IP.
from collections import OrderedDict
import argparse
import logging
# Suppress ipv6 warning when importing scapy
logging.getLogger("scapy.runtime").setLevel(logging.ERROR)
from scapy.all import IP, UDP, send, L3RawSocket, conf
PACKET_FORMAT = "tag=%s&%s&seq=0x%04x"
@irazasyed
irazasyed / homebrew-permissions-issue.md
Last active November 13, 2024 00:27
Homebrew: Permissions Denied Issue Fix (OS X / macOS)

Homebrew Permissions Denied Issues Solution

sudo chown -R $(whoami) $(brew --prefix)/*

@ozkatz
ozkatz / ec2_ssh_config.py
Created June 21, 2013 00:50
generate an ~/.ssh/config file from your EC2 instances, so that you'd never have to lookup those fugly ec2-xx-xx-xx-xxx.compute-1.amazonaws.com hostnames again. Use your instance name instead!
#!/usr/bin/env python
import os
import sys
import argparse
try:
from boto.ec2.connection import EC2Connection
except ImportError:
sys.stderr.write('Please install boto ( http://docs.pythonboto.org/en/latest/getting_started.html )\n')
sys.exit(1)