Skip to content

Instantly share code, notes, and snippets.

View douglarek's full-sized avatar

douglarek

View GitHub Profile
#! /usr/bin/env sh
cmd=$*
while [ true ];
do
eval $cmd
if [ $? -eq 0 ]; then
pip-3.3 freeze --local | cut -d = -f 1 | xargs sudo pip-3.3 install -U
@douglarek
douglarek / unicode_course.txt
Created February 23, 2014 13:07
Python 3.x unicode related collections
1. http://www.gossamer-threads.com/lists/python/dev/1122022 PEP461
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction, and
distribution as defined by Sections 1 through 9 of this document.
@douglarek
douglarek / foo.log
Created March 18, 2014 07:41 — forked from ibeex/foo.log
A warning occurred (42 apples)
An error occurred
-- The lack of documentation for these things is crazy
module HTTPExamples
where
import Network.HTTP
import Control.Applicative
url = "http://www.owainlewis.com"
@douglarek
douglarek / Procfile
Created April 20, 2014 05:52
A Procfile sample for Flask deploy
web: gunicorn -w 4 -b 0.0.0.0:5000 -k gevent run:app
@douglarek
douglarek / longestpalindromes.py
Created April 24, 2014 08:56
Finding the Longest Palindromic Substring in Linear Time -> http://www.akalin.cx/longest-palindrome-linear-time
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Author: Fred Akalin
Link: http://www.akalin.cx/longest-palindrome-linear-time
"""
import sys
@douglarek
douglarek / mysql.txt
Created May 9, 2014 05:50
MySQL Tutorial.
mysql修改表名,列名,列类型,添加表列,删除表列
修改表名(设表明为testtable,将其命名为newtablename)
alter table testtable rename newtablename;
添加表列:
alter table testtable add column name varchar(40);