Skip to content

Instantly share code, notes, and snippets.

View sverweij's full-sized avatar
🌪️
fighting entropy

Sander Verweij sverweij

🌪️
fighting entropy
View GitHub Profile
@jboner
jboner / latency.txt
Last active November 19, 2024 14:58
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@f0ster
f0ster / gist:8411998
Created January 14, 2014 02:26
tmux config that allows scrolling up with mouse wheel/pad in osx
set -g mode-mouse on
set-window-option -g mode-mouse on
set -g terminal-overrides 'xterm*:smcup@:rmcup@'
# ~/.tmux.conf
#
# See the following files:
#
# /opt/local/share/doc/tmux/t-williams.conf
# /opt/local/share/doc/tmux/screen-keys.conf
@dgreda
dgreda / Git.md
Last active May 31, 2020 15:21
Git Tips & Tricks

Delete branches already merged to master

git branch --merged master | grep -v "master" | xargs -n 1 git branch -d

Reduce git repository size

git gc --aggressive --prune=now

@monostere0
monostere0 / lodash_browser_json_transformer.js
Last active August 11, 2016 15:20
Lodash in-browser JSON transformer
(function() {
/*
* LODASH in-Browser JSON transformer
* Use this in a bookmarket (save its contents in a bookmark) and whenever you open a JSON response (e.g. https://www.reddit.com/.json)
* you can use it to test lodash methods against the data.
* Lodash is exposed on window as _ and "json" global variable contains the data within the browser window.
*
* Copy the line below and save it as the url of a new bookmark (it's the same code as below but minified for bookmark use):
* javascript:!function(){function onScriptLoaded(){window.json=JSON.parse(JSON.stringify(initialJSONCode)),display(window.json),input.addEventListener("input",onInput),document.body.appendChild(input),document.body.appendChild(info)}function onInput(t){if(!t.target.value)return display(initialJSONCode),void setInputState(t.target,"success");var e=wrap(t.target.value);e&&"object"==typeof e?(setInputState(t.target,"success"),display(e)):setInputState(t.target,"error")}function display(t){pre.innerText?pre.innerText=J
# you can check that with ssh-add
ssh-add -l
# response when these steps need to be taken: 'The agent has no identities.'
# response when everything ok would be more like: '2048 SHA256:yourkey /Users/youryousername/.ssh/id_rsa (RSA)'
# start the ssh-agent
ssh-agent -s
# add your keys.
ssh-add ~/.ssh/id_rsa
@EdOverflow
EdOverflow / github_bugbountyhunting.md
Last active November 8, 2024 20:13
My tips for finding security issues in GitHub projects.

GitHub for Bug Bounty Hunters

GitHub repositories can disclose all sorts of potentially valuable information for bug bounty hunters. The targets do not always have to be open source for there to be issues. Organization members and their open source projects can sometimes accidentally expose information that could be used against the target company. in this article I will give you a brief overview that should help you get started targeting GitHub repositories for vulnerabilities and for general recon.

Mass Cloning

You can just do your research on github.com, but I would suggest cloning all the target's repositories so that you can run your tests locally. I would highly recommend @mazen160's GitHubCloner. Just run the script and you should be good to go.

$ python githubcloner.py --org organization -o /tmp/output
@tomhicks
tomhicks / plink-plonk.js
Last active November 12, 2024 19:08
Listen to your web pages
@tomhicks
tomhicks / sweep-swoop.js
Last active December 10, 2021 10:02
Listen to your web pages
const audioCtx = new window.AudioContext();
const oscillator = audioCtx.createOscillator();
oscillator.connect(audioCtx.destination);
oscillator.type = "sine";
let numItems = 0
oscillator.frequency.setValueAtTime(
1,
audioCtx.currentTime