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
74018 DEBUG cometServer.12:OPTIONS | |
74019 INFO cometServer.12:Request: 200 None | |
74019 INFO cometServer.13:Accepted connection from ('192.168.1.2', 49206) | |
74021 DEBUG cometServer.13:OPTIONS | |
74021 INFO cometServer.13:Request: 200 None | |
74313 INFO cometServer.14:Accepted connection from ('192.168.1.2', 49207) | |
74316 INFO cometServer.0yPWzZFY:Download started | |
74400 INFO cometServer.15:Accepted connection from ('192.168.1.2', 49208) | |
74402 INFO cometServer.0yPWzZFY:Download started | |
78602 WARNING mediaStore:Duplicate file b6cc27ec2a587df05504da8684eafa7f2412d6c82c063190192d8ff6a64102a873d832e9d99d9e273da4ea9031874c7aea19a803a589563c05a6686b46c978db |
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
phi = function(c) { | |
return eval("("+c+")").apply(null, | |
Array.prototype.slice.call(arguments, 1)); | |
}; | |
s11 = function(c, x) { | |
return "function(){"+ | |
"return ("+c+").apply(null,["+ | |
JSON.stringify(x)+"].concat("+ | |
"Array.prototype.slice.call(arguments,0)));"+ |
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
from math import sin, cos, pi, sqrt, log | |
import random | |
import Image | |
import ImageDraw | |
algs = (('gosper', 'x', 6, { | |
'x': 'x+yf++yf-fx--fxfx-yf+', | |
'y': '-fx+yfyf++yf+fx--fx-y'}), | |
('square', 'x', 4, { | |
'x': 'xf-f+f-xf+f+xf-f+f-x'}), |
OlderNewer