This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'fileutils' | |
load '/etc/rsync-snapshot.conf' | |
def protect | |
if File.exists? LOCK_FILE | |
print "#{$0} already running\n" | |
exit -1 | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <arpa/inet.h> | |
#include <netdb.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include <sys/types.h> | |
#include <sys/socket.h> | |
int main() { | |
sockaddr_in proxyAddress; | |
proxyAddress.sin_family = AF_INET; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Licence : AGPLv3+ | |
# rule:[Privacy] | |
if anyof ( | |
address :is :domain "From" "gmail.com", | |
address :is :domain "From" "live.com", | |
address :is :domain "From" "msn.com", | |
address :is :domain "From" "hotmail.com", | |
address :is :domain "From" "hotmail.fr", | |
address :is :domain "From" "yahoo.com", | |
address :is :domain "From" "yahoo.fr" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'dnsruby' | |
require 'set' | |
require 'thread' | |
require 'parallel' | |
def merge(dns, auth) | |
auth.each do |a| | |
if dns.include? a | |
dns[a] += 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# Licence : AGPLv3+ | |
require 'nokogiri' | |
require 'tempfile' | |
require 'time' | |
RESOLUTION = :p576 | |
AUDIO_FREQUENCY = 44100 | |
ROOT_DIRECTORY = File.expand_path (ARGV[0] || '.') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Station(name, url, description, image) { | |
this.name = name; | |
this.url = url; | |
this.description = description; | |
this.image = image; | |
} | |
var channels = { | |
'di': { | |
'name': 'DI.fm', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
iptables -t nat -N TOR | |
iptables -t nat -A TOR -p tcp -d 127.0.0.0/8 -j RETURN | |
iptables -t nat -A TOR -p tcp -d 10.0.0.0/8 -j RETURN | |
iptables -t nat -A TOR -p tcp -d 172.16.0.0/12 -j RETURN | |
iptables -t nat -A TOR -p tcp -d 192.168.0.0/16 -j RETURN | |
iptables -t nat -A TOR -p tcp -j REDIRECT --to-ports 9052 | |
iptables -t nat -A OUTPUT -p tcp --syn -j TOR | |
iptables -t nat -A OUTPUT -p udp --dport domain -j REDIRECT --to-ports 9053 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var val = 1; | |
function foo() { | |
print(val); | |
val = 2; | |
print(val); | |
} | |
function bar() { | |
var val = 3; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# Licence : AGPLv3+ | |
require 'cgi' | |
require 'fileutils' | |
require 'optparse' | |
require 'rotp' | |
require 'tempfile' | |
require 'uri' | |
class GoogleAuthenticator |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
case "$1" in | |
hpkp) | |
case "$2" in | |
key) | |
openssl rsa -in "$3" -outform der -pubout 2>/dev/null | openssl dgst -sha256 -binary | openssl enc -base64 | |
;; | |
csr) | |
openssl req -in "$3" -pubkey -noout | openssl rsa -pubin -outform der 2>/dev/null | openssl dgst -sha256 -binary | openssl enc -base64 |