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
# author: [email protected] (http://liruqi.wordpress.com/) | |
# require feedparser: http://www.feedparser.org/ | |
# | |
import time | |
import os | |
import feedparser | |
f = feedparser.parse("http://blog.sina.com.cn/rss/1191258123.xml") |
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
gCnt = 0 | |
def main(): | |
squre = [] | |
for i in range(4): | |
squre.append([0,0,0,0]) | |
print squre | |
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 | |
# -*- coding: UTF-8 -*- | |
import copy | |
testcases = int( raw_input() ) | |
for i in range(testcases): | |
nk = raw_input().split(" ") | |
n = int(nk[0]) | |
k = int(nk[1]) | |
data = [] |
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
packet1 = IP(dst='106.187.39.23')/TCP(dport=9999,flags=0x18) | |
packet1.payload = 'GET / HTTP\r\nUser-Agent: curl/7.28.1\r\nHost: liruqi.com\r\nAccept: */*\r\n\r\n' | |
send(packet1) |
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 urllib2 | |
import socket | |
import json | |
import sys | |
from HTMLParser import HTMLParser | |
import requests | |
import argparse | |
import xml.etree.cElementTree as ET | |
url = "http://mesu.apple.com/assets/com_apple_MobileAsset_Font/com_apple_MobileAsset_Font.xml" |
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
Leetcode: | |
1. Search for a Range | |
https://oj.leetcode.com/problems/search-for-a-range/ | |
2. Median of Two Sorted Arrays | |
https://oj.leetcode.com/problems/median-of-two-sorted-arrays/ | |
3. Longest Valid Parentheses | |
https://oj.leetcode.com/problems/longest-valid-parentheses/ | |
4. Copy List with Random Pointer | |
https://oj.leetcode.com/problems/copy-list-with-random-pointer/ |
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
server { | |
listen 80; | |
server_name *.cn *.org *.com *.jp *.hk *.io *.info ""; | |
client_body_timeout 60000; | |
client_max_body_size 1024m; | |
send_timeout 60000; | |
client_header_buffer_size 16k; | |
large_client_header_buffers 4 64k; |
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
server { | |
server_name cl.liruqi.info; | |
error_log /var/log/nginx/cl.liruqi.info.error.log; | |
access_log /var/log/nginx/cl.liruqi.info.access.log; | |
location / { | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_pass http://t66y.com/; | |
# sub_filter t66y.com cl.liruqi.info; |
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
# copied from: http://code.google.com/p/chnroutes/source/browse/trunk/chnroutes.py | |
import re | |
import urllib2 | |
import sys | |
import argparse | |
import math | |
import json | |
def fetch_ip_data(): |
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
-N CHINADDOS nethash --hashsize 5000 --probes 2 | |
-A CHINADDOS 1.180.132.2/32 | |
-A CHINADDOS 1.180.68.122/32 | |
-A CHINADDOS 1.180.80.122/32 | |
-A CHINADDOS 1.183.104.90/32 | |
-A CHINADDOS 1.189.209.20/32 | |
-A CHINADDOS 1.191.188.147/32 | |
-A CHINADDOS 1.192.24.215/32 | |
-A CHINADDOS 1.194.223.228/32 | |
-A CHINADDOS 1.198.113.153/32 |
OlderNewer