Skip to content

Instantly share code, notes, and snippets.

View yishenggudou's full-sized avatar
🍺
Looking for a partner

Abigail Smithson yishenggudou

🍺
Looking for a partner
View GitHub Profile
@yishenggudou
yishenggudou / RSS.py
Created October 15, 2010 11:15 — forked from mnot/RSS.py
#!/usr/bin/env python
"""
RSS.py
Classes for working with RSS channels as arbitrary data structures.
Requires Python 2.2 or newer and PyXML 0.7.1 or newer.
ChannelBase - Base class for RSS Channels.
CollectionChannel - RSS Channel modeled as a URI-per-entry
@yishenggudou
yishenggudou / gist:2667465
Created May 12, 2012 16:28 — forked from ruyrocha/gist:772319
nginx start/stop script (move to /etc/init.d/nginx)
#!/bin/sh
#
# nginx - this script starts and stops the nginx daemon
#
# chkconfig: - 85 15
# description: Nginx is an HTTP(S) server, HTTP(S) reverse \
# proxy and IMAP/POP3 proxy server
# processname: nginx
# config: /etc/nginx/nginx.conf
# config: /etc/sysconfig/nginx
@yishenggudou
yishenggudou / graphite
Created June 11, 2012 08:22 — forked from drawks/graphite
Graphite on uwsgi/nginx
#This is the "site config" for nginx
upstream django {
# Distribute requests to servers based on client IP. This keeps load
# balancing fair but consistent per-client. In this instance we're
# only using one uWGSI worker anyway.
ip_hash;
server unix:/tmp/uwsgi.sock;
}
server {
@yishenggudou
yishenggudou / bash-invocation.md
Created June 12, 2012 07:14 — forked from yegle/bash-invocation.md
Bash Shell启动方式与RC脚本

Bash Shell启动方式与rc脚本

Shell的不同分类

根据启动Bash Shell的方式不同,对Shell有两种分类方式

登录Shell与非登录Shell

根据Shell的启动方式不同,可以将Shell分为

@yishenggudou
yishenggudou / redis_install.sh
Created June 13, 2012 02:49 — forked from ponych/redis install
redis install on CentOS
#!/bin/bash
#Author: timger <yishenggudou@gmail.com>
#weibo <http://t.sina.com/zhanghaibo>
#@yishenggudou http://twitter.com/yishenggudou
#1.安装(CentOS 6.2)
wget --output-document=redis-2.4.14.tar.gz https://code.google.com/p/redis/downloads/detail?name=redis-2.4.14.tar.gz&can=2&q=
tar zxf redis-2.4.14.tar.gz
cd redis-2.4.14
make
@yishenggudou
yishenggudou / redis.conf
Created June 13, 2012 02:53 — forked from ponych/redis.conf
redis.conf
# my copy redis.conf
# changes
# 1. dir
# 2. daemonize yes
# 3. maxmenory 100MB
# 4. logfile /var/log/redis.log
#
#
# Redis configuration file example
#
@yishenggudou
yishenggudou / redisctl
Created June 13, 2012 02:53 — forked from ponych/redisctl
redisctl
#!/bin/sh
# http://vm-192-168-11-21.shengyun.grandcloud.cn/topics/2437
# redis - this script starts and stops the redis-server daemon
#
# chkconfig: 2345 90 10
# description: Redis is a persistent key-value database
# processname: redis-server
# config: /etc/redis.conf
# config: /etc/sysconfig/redis
# pidfile: /var/run/redis.pid
@yishenggudou
yishenggudou / sensu_test_install.sh
Created June 13, 2012 09:08 — forked from joemiller/sensu_test_install.sh
script to setup a sensu client and server for quick testing
#!/bin/sh
#
# The purpose of this script is to setup all the pre-reqs needed to
# standup a quick single-node Sensu client + server for use during
# testing.
#
# I don't recommend using this for a production setup, but if you must,
# then you should replace the SSL keys and certs with your own.
# You can use the script from this repo to help with SSL certs:
# https://github.com/joemiller/joemiller.me-intro-to-sensu
@yishenggudou
yishenggudou / carousel.py
Created August 8, 2012 12:04
kivy carousel sample
var countries_data = {"type":"FeatureCollection","features":[
{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[74.92,37.24],[74.57,37.03],[72.56,36.82],[71.24,36.13],[71.65,35.42],[71.08,34.06],[69.91,34.04],[70.33,33.33],[69.51,33.03],[69.33,31.94],[66.72,31.21],[66.26,29.85],[62.48,29.41],[60.87,29.86],[61.85,31.02],[60.84,31.5],[60.58,33.07],[60.94,33.52],[60.51,34.14],[61.28,35.61],[62.72,35.25],[63.12,35.86],[64.5,36.28],[64.8,37.12],[66.54,37.37],[67.78,37.19],[69.32,37.12],[70.97,38.47],[71.59,37.9],[71.68,36.68],[73.31,37.46],[74.92,37.24]]]]},"properties":{"name":"Afghanistan"},"id":"AF"},
{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[19.44,41.02],[19.37,41.85],[19.65,42.62],[20.07,42.56],[20.59,41.88],[20.82,40.91],[20.98,40.86],[20.01,39.69],[19.29,40.42],[19.44,41.02]]]]},"properties":{"name":"Albania"},"id":"AL"},
{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[2.96,36.8],[8.62,36.94],[8.18,36.52],[8.25,34.64],[7.49,33.89],[9.06,3