Skip to content

Instantly share code, notes, and snippets.

@ravageralpha
ravageralpha / fetchsub.sh
Created October 27, 2012 16:53
shell script get subtitle from shooter.cn
#!/bin/sh
# Author: RA <ravageralpha@gmail.com>
USAGE(){
echo "Usage:$(basename $0) [eng] files..."
}
[ $# -eq 0 ] && USAGE && exit 0
ERROR(){
@scturtle
scturtle / gist:3060332
Created July 6, 2012 14:05
python 3 语法变化
@lwjef
lwjef / url2opml.py
Created April 9, 2012 12:07
create opml from url
# coding=utf-8
from BeautifulSoup import BeautifulSoup
import urllib2
import sys, os
reload(sys)
sys.setdefaultencoding('utf-8')
input_file = sys.argv[1]
output_opml = sys.argv[2]
@zrong
zrong / dnspodsh.sh
Last active April 2, 2024 04:44
在bash中使用DNSPod的API接口实现DDNS客户端
#!/bin/bash
##############################
# dnspodsh v0.3
# 基于dnspod api构架的bash ddns客户端
# 作者:zrong(zengrong.net)
# 详细介绍:http://zengrong.net/post/1524.htm
# 创建日期:2012-02-13
# 更新日期:2012-03-11
##############################
@quietlynn
quietlynn / 12306.user.js
Created January 3, 2012 12:01
12306 Auto Query => A javascript snippet to help you book ticket
/*
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
@ramsey
ramsey / generate-opml.php
Created November 16, 2011 20:00
Generate OPML file from Delicious blogroll tag
#!/usr/local/bin/php
<?php
include_once('getRSSLocation.php');
// del.icio.us username and password
$username = 'your_username';
$password = 'your_password';
$cache_file = '/tmp/delicious-blogroll.xml';
$blogs = array();
anonymous
anonymous / gist:1335723
Created November 3, 2011 03:43
Pandora Nginx Reversed Proxy Config
location / {
proxy_pass http://www.pandora.com;
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
@sunng87
sunng87 / .conkyrc
Created September 16, 2011 12:42
My OpenBox Desktop
# conky configuration
# edited by darcon@gmail.com
# set to yes if you want Conky to be forked in the background
background no
# X font when Xft is disabled, you can pick one with program xfontsel
#font 5x7
#font 6x10
#font 7x13
@huacnlee
huacnlee / nginx.conf
Created September 14, 2011 13:50
Nginx http proxy cache to mirror of Rubygems.org
# 在本地服务器建立 rubygems.org 的镜像缓存,以提高 gem 的安装速度
# 此配置设置缓存过期为1天,也就是说,新上的 gem 无法马上安装
# 做这个起什么作用?
# rubygems 的很多资源文件是存放到 Amazon S3 上面的,由于 GFW 对某些 S3 服务器又连接重置或丢包,导致 gem 安装异常缓慢或有时候根本无法连接安装。
# 而通过这种跳板的方式可以很好的解决这个问题,当然前提是 Nginx反向代理 服务器需要在国外
proxy_cache_path /var/cache/rubygems levels=1:2 keys_zone=RUBYGEMS:10m
inactive=24h max_size=1g;
server {
listen 80;
@dhinus
dhinus / applemail_to_opml.bash
Created May 18, 2011 07:33
Export Apple Mail RSS feeds to opml
#!/bin/bash
#
# Script to export Mail RSS subscriptions to an OPML file.
# Written by VividVisions.com
# http://www.vividvisions.com/2008/02/22/rss-subscriptions-aus-apple-mail-exportieren/
#
# Modified by Francesco Negri
# https://github.com/dhinus
IFS=$'\n'