This file contains 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 | |
if [ "$IFACE" != eth0 ]; then | |
exit 0 | |
fi | |
case "$MODE" in | |
start) | |
route add -host 144.76.73.47 dev eth0 | |
route add -net default gw 144.76.73.47 |
This file contains 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
import math | |
import random | |
from fractions import Fraction | |
D = 365 | |
def ncr(n, r): | |
return math.factorial(n) / math.factorial(r) / math.factorial(n-r) | |
points = [] |
This file contains 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
import os | |
import os.path | |
# Tests for suspicious folders used by finfisher. | |
# Source: | |
# http://belsec.skynetblogs.be/archive/2014/08/07/check-your-linuxservers-are-you-infected-with-the-finphisher-8252101.html | |
first = ['.fontconfig', '.gconf', '.gnome', '.gnome2', '.kde', '.local', | |
'.qt', '.ssh'] | |
second = ['.config', '.bin', '.sbin', '.etc', '.cfg', '.apps'] |
This file contains 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
Dir.entries('.').each do |old| | |
next if old.end_with? '.rb' | |
next if ['.', '..'].include? old | |
new = old.split('-', 2)[0].strip + '.flac' | |
File.rename(old, new) | |
end |
This file contains 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 python | |
import os | |
import os.path | |
import subprocess | |
for fn in os.listdir('.'): | |
if not os.path.isfile(fn): | |
continue | |
if not fn.endswith('.fif'): |
This file contains 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/python | |
import os | |
import os.path | |
base_path = '.' | |
todo = [base_path] | |
while todo: | |
current_dir = todo.pop() |
This file contains 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
import subprocess | |
while True: | |
p = subprocess.Popen(['cat'], stdin=subprocess.PIPE, | |
stdout=subprocess.PIPE) | |
p.stdin.close() | |
p.wait() |
This file contains 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
--- /etc/xen/scripts/vif-route 2013-01-22 17:41:48.000000000 +0100 | |
+++ /etc/xen/scripts/our-vif-route 2015-05-16 20:52:46.000000000 +0200 | |
@@ -23,11 +23,37 @@ | |
dir=$(dirname "$0") | |
. "${dir}/vif-common.sh" | |
+ip6_of() | |
+{ | |
+ ip -6 addr show "$1" | perl -wane '/scope global/ && /inet6 (([0-9a-f]+:*)+)/ && print $1;' | |
+} |
This file contains 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
# autogenerated by Vagrantfile--- | |
secrets: | |
chucknorris: 4fc80eba58ec111d80c428777b8607e2 | |
mysql_forum: bfb170afc7d2751589f20bb98a8ff7c8 | |
django_secret_key: 0a92901e77362f27240de17efae8e3fb | |
mysql_wiki: 3fe280c48f7820b3da7dffcdf4b09ffb | |
mysql_wolk: d8f4d98841e84ae9716a49548647015f | |
apikey: e363fb6984515c72522692d920870559 | |
mailman_default: 0a9d5b9aed2f6cfa0ffb417b6da79f00 | |
ldap_infra: 7d40946647e37313ac99f0169b8fed6c |