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
vm.panic_on_oom=1 | |
kernel.panic=10 | |
# protect against tcp time-wait assassination hazards | |
net.ipv4.tcp_rfc1337 = 1 | |
net.ipv4.conf.all.accept_redirects = 0 | |
net.ipv4.ip_forward = 1 | |
net.ipv4.tcp_fastopen = 3 |
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
public class MultiTable { | |
public static void printMulti(int row, int col) { | |
if (row == 0 && col == 0) | |
System.out.printf(" * "); | |
else if (col == 0) | |
System.out.printf("%4d ", row); | |
else if (row == 0) | |
System.out.printf("%4d ", col); | |
else |
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 requests | |
URL = 'http://speedtest-sfo1.digitalocean.com/10mb.test' | |
headers = {'User-Agent': '-.-'} | |
resp = requests.get(URL, headers=headers, stream=True) | |
totalsize = int(resp.headers.get('content-length', '0')) | |
with open('10mb.test', 'wb') as f: | |
downsize = 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
#!/usr/bin/env python3 | |
""" | |
Script to check postfix's mail queue and forward all deferred mails via IMAP. | |
Forwarded mails will be removed from queue. | |
Only handle mails in deferred queue and whose's (one of) recipients is EMAIL. | |
""" | |
from imaplib import IMAP4_SSL | |
from subprocess import check_output | |
import json |
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
# 1 - cubic | |
Connecting to host ***, port 5201 | |
[ 4] local 45.63.*.* port 45594 connected to 110.84.*.* port 5201 | |
[ ID] Interval Transfer Bandwidth Retr Cwnd | |
[ 4] 0.00-1.00 sec 142 KBytes 1.16 Mbits/sec 1 9.84 KBytes | |
[ 4] 1.00-2.00 sec 23.9 KBytes 196 Kbits/sec 2 16.9 KBytes | |
[ 4] 2.00-3.00 sec 12.7 KBytes 104 Kbits/sec 4 11.2 KBytes | |
[ 4] 3.00-4.00 sec 63.3 KBytes 519 Kbits/sec 3 5.62 KBytes | |
[ 4] 4.00-5.00 sec 0.00 Bytes 0.00 bits/sec 0 7.03 KBytes | |
[ 4] 5.00-6.00 sec 63.3 KBytes 518 Kbits/sec 1 5.62 KBytes |
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 | |
#encoding: utf-8 | |
# Copyright (C) 2013 @XiErCh | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is |
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
{ | |
"host": "password", | |
"sorz": "hWUVw79k" | |
} |
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 python3 | |
import sys | |
import math | |
from ipaddress import IPv4Network | |
def main(): | |
for line in sys.stdin: | |
if 'CN' not in line or 'ipv4' not in line: | |
continue |
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 python3 | |
import re | |
import sys | |
RE_HOST = r'^\|\|([a-z0-9\.\-]+[a-z]+[a-z0-9\.\-]+)\^$' | |
def main(): | |
re_host = re.compile(RE_HOST) | |
for line in sys.stdin: |
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
// ==UserScript== | |
// @name HD Avatar for Tweetdeck | |
// @namespace org.sorz.lab.tweetdeck | |
// @include https://tweetdeck.twitter.com/ | |
// @version 0.1 | |
// @grant none | |
// @require https://cdn.rawgit.com/jpillora/xhook/1.3.5/dist/xhook.min.js | |
// ==/UserScript== | |
const REGEX_AVATAR_URL = /(\/profile_images\\\/\d+\\\/[\w-]+_)(normal)(\.)/g |