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
var a = 'SOCKS5 127.0.0.1:1080;SOCKS 127.0.0.1:1080;DIRECT'; | |
function FindProxyForURL(url, host) { | |
var b = a; | |
a = 'DIRECT'; | |
return b; | |
} |
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
curl --socks5-hostname 127.0.0.1:1080 -v http://www.google.com/ 2>&1 | python test_latency.py |
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
#if !defined(POLARSSL_CONFIG_FILE) | |
#include "polarssl/config.h" | |
#else | |
#include POLARSSL_CONFIG_FILE | |
#endif | |
#if defined(POLARSSL_AES_C) | |
#include "polarssl/aes.h" |
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
$ g++ -g LRU.cpp | |
In file included from LRU.cpp:2: | |
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ext/hash_map:212:5: warning: | |
Use of the header <ext/hash_map> is deprecated. Migrate to <unordered_map> [-W#warnings] | |
# warning Use of the header <ext/hash_map> is deprecated. Migrate to <unordered_map> | |
^ | |
1 warning generated | |
$ lldb ./a.out | |
(lldb) target create "./a.out" | |
Current executable set to './a.out' (x86_64). |
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
errf("opening"); | |
FILE *f = fopen("test", "rb"); | |
fread(ctx->udp_buf + SHADOWVPN_PACKET_OFFSET, 1, 1024, f); | |
if (-1 == crypto_decrypt(ctx->tun_buf, ctx->udp_buf, 1000)) { | |
errf("failure"); | |
} else { | |
errf("success"); | |
} |
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
input_str = "{'a':[{'b':'1','d':'3',},{'b':'2','d'='a'},{'b':'3','d':'4'}],'c':'1'}" | |
import json | |
class storage(object): | |
def __init__(self, dct): | |
self.__dict__ = dct | |
result = json.loads(input_str.replace("'",'"').replace("=", ":").replace(",}","}"), object_hook=storage) |
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
<a href="#" title="blue">blue</a> | |
<a href="#" title="red">red</a> | |
<script> | |
function bgc() { | |
var links = document.getElementsByTagName('a'); | |
for (var i = 0; i < links.length; ++i) { | |
links[i].onclick = (function() { | |
var color = links[i].title; | |
return function() { | |
document.body.style.backgroundColor = color; |
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 sys | |
import getpass | |
import subprocess | |
password = getpass.getpass('input password:') | |
for line in open('server_list.txt'): | |
line = line.strip() | |
print line | |
os.system('scp init_directory.sh %s:~/' % line) | |
s = subprocess.Popen(['ssh', line, "sudo", "-S", "bash", "init_directory.sh"], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE) |
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/python | |
import inspect | |
LINES_TO_PRINT = 5 | |
# blarblarblar | |
# foobar | |
frame = inspect.currentframe() |
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/python | |
import inspect | |
LINES_TO_PRINT = 5 | |
# blahblahblah | |
# foobar | |
frame = inspect.currentframe() |
OlderNewer