Skip to content

Instantly share code, notes, and snippets.

View QiMa's full-sized avatar

马骐 QiMa

View GitHub Profile
@QiMa
QiMa / centos_python_env_setup
Last active May 24, 2016 08:50 — forked from floer32/centos_python_env_setup
CentOS, Python3, virtualenv, django-cms , gunicorn
#!/bin/bash
cd /tmp
yum groupinstall "Development tools"
yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel
wget http://python.org/ftp/python/3.3.2/Python-3.3.2.tar.bz2
tar xf Python-3.3.0.tar.bz2
mv Python-3.3.0 /usr/local/
cd /usr/local/Python-3.3.0
@QiMa
QiMa / gist:f046b4b3624cf5ea20bb
Created October 4, 2014 15:40
Unpacker png from TexturePacker
#! /usr/lical/bin/python
import os,sys
from xml.etree import ElementTree
from PIL import Image
def tree_to_dict(tree):
d = {}
for index, item in enumerate(tree):
if item.tag == 'key':
if tree[index+1].tag == 'string':
#!/bin/zsh
# pyenv install for CentOS 6.5 x86_64
yum install -y gcc gcc-c++ make git patch openssl-devel zlib-devel readline-devel sqlite-devel bzip2-devel
git clone git://github.com/yyuu/pyenv.git ~/.pyenv
export PATH="$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init -)"