Skip to content

Instantly share code, notes, and snippets.

--- a/globals.h 2009-08-25 21:08:52.000000000 +0200
+++ b/globals.h 2010-12-11 13:34:36.934682237 +0100
@@ -227,6 +227,9 @@
WHERE char *PgpSignAs;
WHERE short PgpTimeout;
WHERE char *PgpEntryFormat;
+/* custom patch */
+WHERE char *PgpMimeSignatureFilename;
+WHERE char *PgpMimeSignatureDescription;
WHERE char *PgpClearSignCommand;
rrSets := map[uint16][]dns.RR{}
for _, rr := range r.Response.Answer {
rrtype := rr.Header().Rrtype
set, ok := rrSets[rrtype]
if !ok {
set = []dns.RR{}
}
rrSets[rrtype] = append(set, rr)
diff --git a/HPN-README b/HPN-README
new file mode 100644
index 0000000..7cb3b97
--- /dev/null
+++ b/HPN-README
@@ -0,0 +1,129 @@
+Notes:
+
+MULTI-THREADED CIPHER:
+The AES cipher in CTR mode has been multithreaded (MTR-AES-CTR). This will allow ssh installations
@FiloSottile
FiloSottile / pass-rekey.sh
Last active August 29, 2015 14:13
password-store rekey script
#! /bin/bash
# http://redsymbol.net/articles/unofficial-bash-strict-mode/
set -euo pipefail
IFS=$'\n\t'
readonly PASSWORD_STORE=~/.password-store
relpath() {
python -c "import os.path; print os.path.relpath('$1','${2:-$PWD}')"
@FiloSottile
FiloSottile / playlist-dl.py
Created March 15, 2012 23:44
Download a youtube playlist using rg3/youtube-dl by @orschiro
import shutil
import os
import sys
import subprocess
import re
# Settings
root_folder = 'C:/Users/Robert/Videos/YouTube/Playlists/'
destination_regex = re.compile(r'^\[download\] Destination: (.*)$', re.M)
@FiloSottile
FiloSottile / gist:2176911
Created March 24, 2012 01:00
Youtube video URL regex from `youtube-dl` explained
# The youtube-dl YouTube URL regex

^
(
	(?:https?://)?										# http(s):// (optional)
	(?:youtu\.be/|(?:\w+\.)?youtube(?:-nocookie)?\.com/|tube\.majestyc\.net/) # the various hostnames, with wildcard subdomains
	(?!view_play_list|my_playlists|artist|playlist)		# ignore playlist URLs
	(?:													# the various things that can precede the ID:
		(?:(?:v|embed|e)/)								# v/ or embed/ or e/
@FiloSottile
FiloSottile / Ubuntu-console.txt
Created April 19, 2012 17:07
Some testing around OS I/O encodings in python
*** locale.getpreferredencoding() : UTF-8
u'\xe8' è
repr(sys.argv[1]) u'\xe8'
repr(raw_input()) u'\xe8'
*** sys.stdout.encoding : UTF-8
u'\xe8' è
repr(sys.argv[1]) u'\xe8'
repr(raw_input()) u'\xe8'
@FiloSottile
FiloSottile / gist:2667279
Created May 12, 2012 15:54
Render only an element with PhantomJS
page.clipRect = page.evaluate(function() {
return document.getElementById(ELEMENT_ID).getBoundingClientRect();
});
@FiloSottile
FiloSottile / rtmpdump.log
Created July 6, 2012 15:08
RTMP logs for weird YouTube videos
RTMPDump v2.5 GIT-2012-03-31 (Handshake 10 support by Xeebo)
(c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL
Connecting ...
WARNING: HandShake: Type mismatch: client sent 6, server answered 10
INFO: Connected...
ERROR: HandleCtrl: SWFVerification Type 2 request not supported, attempting to use SWFVerification Type 1! Patches welcome...
ERROR: RTMP_ReadPacket, failed to read RTMP packet header
@FiloSottile
FiloSottile / griddy.py
Created September 7, 2012 16:20
Raccolta dati Rovereto 2012
#!/usr/bin/env python
#-*- coding:utf-8 -*-
# QUESTO È LO SCRIPT CHE HO USATO PER CREARE LA TABELLA INIZIALMENTE
SPKEY = "0Ap3raRAXNEtldE9WdDJtbHBzb3JxV01hTFF5cEQ4OXc"
UNAME = "filosottile.wiki"
PASSW = "xxxxxxxxxxxxxxxx"
DATA = """ *** I DATI RESTITUITI DA FACEBOOK *** """