Skip to content

Instantly share code, notes, and snippets.

View Habbie's full-sized avatar

Peter van Dijk Habbie

View GitHub Profile
def get_random_string(length=12, allowed_chars='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'):
"""
Returns a random string of length characters from the set of a-z, A-Z, 0-9
for use as a salt.
The default length of 12 with the a-z, A-Z, 0-9 character set returns
a 71-bit salt. log_2((26+26+10)^12) =~ 71 bits
"""
import random
try:
@Habbie
Habbie / pdns-recursor-3.1.4-init_d.patch
Created April 22, 2013 10:18
authoritative -> recursing in pdns-recursor.init.d
blabla
@Habbie
Habbie / pdns-recursor-3.1.4-init_d.patch
Created April 22, 2013 10:34
authoritative -> recursing in pdns-recursor.init.d
blabla
@Habbie
Habbie / pdns-recursor-3.1.4-init_d.patch
Created April 22, 2013 10:36
authoritative -> recursing in pdns-recursor.init.d
blabla
@Habbie
Habbie / pdns-recursor-3.1.4-init_d.patch
Created April 22, 2013 10:39
authoritative -> recursing in pdns-recursor.init.d
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>
@Habbie
Habbie / pdns-recursor-3.1.4-init_d.patch
Created April 22, 2013 10:40
authoritative -> recursing in pdns-recursor.init.d
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>
@Habbie
Habbie / pdns-recursor-3.1.4-init_d.patch
Created April 22, 2013 10:43
authoritative -> recursing in pdns-recursor.init.d
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>