Skip to content

Instantly share code, notes, and snippets.

View bdrewery's full-sized avatar

Bryan Drewery bdrewery

  • Seattle, Washington
View GitHub Profile
@thesamesam
thesamesam / xz-backdoor.md
Last active May 14, 2024 08:12
xz-utils backdoor situation (CVE-2024-3094)

FAQ on the xz-utils backdoor (CVE-2024-3094)

This is a living document. Everything in this document is made in good faith of being accurate, but like I just said; we don't yet know everything about what's going on.

Background

On March 29th, 2024, a backdoor was discovered in xz-utils, a suite of software that

@chipbuster
chipbuster / benchmark_build.py
Last active March 4, 2024 21:19
Rust Compilation Benchmarks
# A script to automate the timings of Rust compilation benchmarks used at
# https://www.reddit.com/r/rust/comments/qgi421/doing_m1_macbook_pro_m1_max_64gb_compile/
import sys,os
import subprocess
import tempfile
import time
import json
# You need to have the wasm32-unknown-unknown target installed, use
# `rustup target install wasm32-unknown-unknown` to get it.
@jamesmacwhite
jamesmacwhite / Workarounds for Netflix and the blocking of IPv6 tunnels.md
Last active May 6, 2024 09:00
Prevent proxy/VPN streaming error messages from Netflix when using a Hurricane Electric IPv6 tunnel.

Workarounds for Netflix and the blocking of Hurricane Electric IPv6 tunnels

The dreaded "You seem to be using an unblocker or proxy." error message. Cool story bro.

This gist was essentially created out of my own rant about Netflix being hostile to IPv6 tunnel services since June 2016. You are welcome to read my opinion on the matter, this is the more technical side to the issue and how to combat it within your own network.

Since I wrote this, various GitHub users have contributed their thoughts and ideas which has been incorporated into this gist. Thank you to everyone who have contributed their own methods and implementations.

The problem

Netflix now treats IPv6 tunnel brokers (such as Hurricane Electric) as proxy servers. A while ago it became apparent to users and Netflix that somewhat by accident, IPv6 tunnel users were being served content outside of their geolocation because of the way Netflix was identifyi

@coderofsalvation
coderofsalvation / exceptions.bash
Last active December 17, 2020 13:09
simple event/exception handling for bash using 2 simple functions. Handy to keep your bash code compact, responsive and extendable. The advantage of this is that it prevents a lot of if/else code.
# simple event / exception handling in bash
#
# onFoo(){
# echo "onFoo() called width arg $1!"
# }
#
# onExit(){
# echo "onExit called!"
# }
#
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 13, 2024 22:10
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname