Skip to content

Instantly share code, notes, and snippets.

View liruqi's full-sized avatar

Ruqi liruqi

View GitHub Profile
@liruqi
liruqi / AppleDownloadFonts.py
Created July 10, 2014 03:51
Get the names of apple download fonts
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"
@liruqi
liruqi / 2014-11-15
Created November 14, 2014 01:49
本周六(11月15日)交流题目
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/
@liruqi
liruqi / nginxhttpproxy.conf
Created November 22, 2014 15:29
nginx http proxy config
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;
@liruqi
liruqi / cl.liruqi.info.conf
Created November 24, 2014 06:36
cl.liruqi.info config
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;
@liruqi
liruqi / CHINADDOS.ip
Last active August 29, 2015 14:11
China shadowsocks ddos
-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
@liruqi
liruqi / config
Created March 25, 2015 03:53
My software config
Terminal:
Menlo Regular 13 pt.
@liruqi
liruqi / yii2-droplist
Last active August 29, 2015 14:17
Yii2 Drop list down value mapping
<?php
# Drop down list value mapping
# File models/Report.php
public function areaTypeMapping() {
return ['公共区域', '办公区域'];
}
# views/report/_form.php
正标题:SPECTACULAR FUTURE
副标题:ECO-CITY WITH PASSIVE HOUSE
作者简介:(配我的照片)
Qian Zhang, 20, Beijing
Qian is currently pursuing a bachelor’s degree in HAVC (Heating, Ventilating and Air Conditioning) at Beijing University of Civil Engineering and Architecture.
She had named “Beijing outstanding student cadre”.
Her studies focus on energy saving building.
Research Interests: Energy Saving Building, Room Environment, Interior Ventilation.

平台:DigitalOcean VPS ubuntu14.04 x64, strongswan5.2.2 运行以下命令请使用root权限

一:安装strongswan

由于ubuntu软件仓库中strongswan版本较低,因此从官网源码编译安装

apt-get install build-essential     #编译环境
aptitude install libgmp10 libgmp3-dev libssl-dev pkg-config libpcsclite-dev libpam0g-dev     #编译所需要的软件
@liruqi
liruqi / twocoldrss.py
Created June 29, 2011 14:47
检查韩寒博客,如果有同月同日发博文,则会发送一个桌面提醒~
# author: liruqi@gmail.com (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")