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
#!/bin/sh | |
# chkconfig: 2345 55 45 | |
# description: start or stop gunicorn | |
# chkconfig –add gunicorn in centos and redhat | |
# update-rc.d gunicorn defaults in debian and ubuntu | |
### BEGIN INIT INFO | |
# Provides: gunicorn | |
# Required-Start: $all |
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
# -*- coding: utf-8 -*- | |
import vobject, sys, codecs | |
from os import path | |
def hasTel(lineList): | |
for line in lineList: | |
if line[:len('TEL;')] == 'TEL;': | |
return True | |
return False |
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
date.today().strftime(u'%Y年%m月%d日'.encode('utf-8')).decode('utf-8') | |
#输出:2012年11月27日 |
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
\documentclass[$if(fontsize)$$fontsize$,$endif$$if(lang)$$lang$,$endif$]{$documentclass$} | |
\usepackage[T1]{fontenc} | |
\usepackage{lmodern} | |
\usepackage{amssymb,amsmath} | |
\usepackage{ifxetex,ifluatex} | |
\usepackage{fixltx2e} % provides \textsubscript | |
% use microtype if available | |
\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex | |
\IfFileExists{microtype.sty}{\usepackage{microtype}}{} | |
\usepackage[utf8]{inputenc} |
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
# -*- coding: utf-8 -*- | |
""" | |
Created on Wed Jan 23 11:19:33 2013 | |
@author: Stardrad | |
""" | |
import sys, os, codecs | |
if len(sys.argv) < 2: | |
print u'参数不够' |
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
# -*- coding: utf-8 -*- | |
""" | |
Created on Mon May 20 16:15:32 2013 | |
@author: Yinxy | |
""" | |
import os, fnmatch | |
for pathName, dirNames, fileNames in os.walk('.'): | |
print pathName |
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
# -*- coding: utf-8 -*- | |
""" | |
Created on Fri May 24 10:29:36 2013 | |
@author: Stardrad Yin | |
""" | |
# http://fourier.eng.hmc.edu/e161/lectures/wht/node3.html | |
import numpy | |
from Tkinter import Tk |
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
# -*- coding: utf-8 -*- | |
""" | |
Created on Thu Jul 11 09:50:16 2013 | |
@author: Stardrad Yin | |
""" | |
import os, fnmatch, struct | |
timeDic = {'mv00':89, 'mv04':67, 'mv05':102, 'mv06':29, 'mv07':27,\ | |
'mv08':34, 'mv10':21, 'mv12':21} | |
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
// Squish bindings for python | |
// http://stackoverflow.com/questions/10972595/dxt-compression-for-python | |
// modify Stardrad | |
#include <squish.h> | |
#include "pysquish.h" | |
extern "C" { | |
void CompressMasked(u8 const* rgba, int mask, void* block, int flags) { |
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
# Python27/Lib/mimetypes.py | |
# Line 248 | |
# Original Line, comment the following lines | |
def enum_types(mimedb): | |
i = 0 | |
while True: | |
try: |
OlderNewer