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 https://raw.github.com/cheshirecats/CuriousWall/2d1387e6d15571e7c6986e0cb30df1114b1c8030/account.php > 1 | |
$ curl https://raw.github.com/cheshirecats/CuriousWall/master/account.php > 2 | |
$ hexdump -c 1 | head -n 2 | |
0000000 < ? p h p \r \n e r r o r _ r | |
0000010 e p o r t i n g ( E _ A L L ) ; | |
$ hexdump -c 2 | head -n 2 | |
0000000 < ? p h p \n e r r o r _ r e |
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() |
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
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
<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
var stringToParse = '\\u4f60\\u8bd5\\u8bd5'; | |
JSON.parse('"'+ stringToParse + '"'); |
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
/* | |
12306 Auto Query => A javascript snippet to help you book tickets online. | |
Copyright (C) 2011-2012 Jingqin Lynn | |
Includes jQuery | |
Copyright 2011, John Resig | |
Dual licensed under the MIT or GPL Version 2 licenses. | |
http://jquery.org/license | |
Includes Sizzle.js |
NewerOlder