Skip to content

Instantly share code, notes, and snippets.

@FiloSottile
FiloSottile / gist:3801281
Created September 28, 2012 17:58
Makefile diff
diff --git a/Makefile b/Makefile
index 21b3469..c960bfa 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,9 @@
-all: youtube-dl youtube-dl.exe README.md youtube-dl.1 youtube-dl.bash-completion LATEST_VERSION
+all: youtube-dl README.md youtube-dl.1 youtube-dl.bash-completion LATEST_VERSION
+
+# TODO: re-add youtube-dl.exe, and make sure it's 1. safe and 2. doesn't need sudo
+
@FiloSottile
FiloSottile / gnupg21-pcsc-wrapper-hang.patch
Last active October 17, 2015 21:35
Tested on GnuPG 2.1.9. Fixes hang when using gpg-agent with YubiKeys on OS X. Port of https://github.com/GPGTools/MacGPG2/blob/6b5a3c/Formula/Patches/gnupg2/pcsc-wrapper.patch
--- a/scd/apdu.c 2015-10-17 22:25:39.000000000 +0100
+++ b/scd/apdu.c 2015-10-17 22:29:52.000000000 +0100
@@ -29,6 +29,7 @@
#include <string.h>
#include <assert.h>
#include <signal.h>
+#include <pthread.h>
#ifdef USE_NPTH
# include <unistd.h>
# include <fcntl.h>
@FiloSottile
FiloSottile / gist:4653745
Last active December 11, 2015 20:09
Coursera Algo1 class - programming assignments - test cases
39555
76914
62328
96066
78739
31842
83766
18474
86578
78136
w8KQmps-Sog Normal
{u'itag': [u'46'], u'url': [u'http://r1---sn-nx5cvox-hpad.c.youtube.com/videoplayback?itag=46&mv=m&gcr=it&ms=au&id=c3c2909a9b3e4a88&fexp=916601%2C924320%2C916626%2C920704%2C912806%2C922403%2C922405%2C929901%2C913605%2C925710%2C929104%2C906938%2C920201%2C913302%2C930101%2C919009%2C911116%2C910221%2C901451%2C919114&cp=U0hUTlRLUV9FSkNONF9MRVVCOjlCQzFTVGtQY0hv&expire=1359403100&mt=1359379334&sver=3&ip=80.180.116.236&key=yt1&upn=mDL2xkaivXQ&source=youtube&sparams=cp%2Cgcr%2Cid%2Cip%2Cipbits%2Citag%2Cratebypass%2Csource%2Cupn%2Cexpire&ipbits=8&ratebypass=yes'], u'type': [u'video/webm; codecs="vp8.0, vorbis"'], u'fallback_host': [u'tc.v1.cache3.c.youtube.com'], u'sig': [u'B3CC16060B19E846C79E714F3AD5B015EA64B2F6.B68160D7FFAD9FB23DD1FF2D7696DEF85FBFB2DD'], u'quality': [u'hd1080']}
{
"fallback_host": "tc.v1.cache3.c.youtube.com",
"itag": "46",
"quality": "hd1080",
"sig": "D130E8854BE712B26FC57DB992866984F7BFB3C0.D8E051D55603C6334F90B136172E1236AC4D622B",
"type": "video/webm; codecs=\"v
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@FiloSottile
FiloSottile / gist:5872198
Created June 26, 2013 22:10
YT cipher s tests
"qwertyuioplkjhgfdsazxcvbnm1234567890QWERTYUIOPLKJHGFDSAZXCVBNM!@#$%^&*()_-+={[]}|:;?/>.<"
"J:|}][{=+-_)(*&;%$#@>MNBVCXZASDFGH^KLPOIUYTREWQ0987654321mnbvcxzasdfghrklpoiuytej"
"qwertyuioplkjhgfdsazxcvbnm1234567890QWERTYUIOPLKJHGFDSAZXCVBNM!@#$^&*()_-+={[]}|:;?/>.<"
"!?;:|}][{=+-_)(*&^$#@/MNBVCXZASqFGHJKLPOIUYTREWQ0987654321mnbvcxzasdfghjklpoiuytr"
"qwertyuioplkjhgfdsazxcvbnm1234567890QWERTYUIOPLKJHGFDSAZXCVBNM!@#$%^&*()_-+={[|};?/>.<"
"ertyuioplkjhgfdqazxcvbnm1234567890QWERT}UIOPLKJHGFDSAZXCVBNM!@#$%^&*()_-+={[|/;?Y"
"qwertyuioplkjhgfdsazxcvbnm1234567890QWERTYUIOPLKJHGFDSAZXCVBNM!@#$%^&*()_-+={[};?/>.<"
>>> plaintext = 1337
>>> key = 4242
>>> ciphertext = plaintext ^ key
>>> ciphertext
5547
>>> ciphertext ^ key
1337
>>> ciphertext ^ plaintext
4242
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package tls
import (
"bytes"
"crypto/hmac"
"crypto/sha1"
@FiloSottile
FiloSottile / gist:6668770
Created September 23, 2013 10:28
opensn0w with iPhone3,1 and iOS 7.0 segfault
opensn0w 2.0, free your devices.
version: opensn0w-2.0.0/DEVELOPMENT_X86_64(clang)
Compiled on: Sep 23 2013 10:38:05
Registering patch "iBSS_SignatureCheck" with size 12 for ARMv0 to patch list 0x7fdbfb40a860
Registering patch "iBEC_SignatureCheck" with size 12 for ARMv0 to patch list 0x7fdbfb40a860
Registering patch "iBoot_SignatureCheck" with size 14 for ARMv0 to patch list 0x7fdbfb40a860
Registering patch "iBoot_BootArgsConditional" with size 6 for ARMv0 to patch list 0x7fdbfb40a860
Registering patch "iBoot_gBootArgs" with size 39 for ARMv0 to patch list 0x7fdbfb40a860
@FiloSottile
FiloSottile / crontab
Last active December 26, 2015 01:59
Shell script to run @Neal's savethemblobs in a cronjob https://github.com/Neal/savethemblobs
0 5 * * 1 bash -c "cd ~/shsh-blobs/; ./savethem.sh"