Skip to content

Instantly share code, notes, and snippets.

View jiemachina's full-sized avatar
🚛

Jie.Ma jiemachina

🚛
View GitHub Profile
@jiemachina
jiemachina / gist:4092218
Created November 17, 2012 00:41
python nginx
nginx和tornado就像apache和tomcat的功能;
@jiemachina
jiemachina / gist:4465609
Last active December 10, 2015 17:08
channel build
#!/usr/bin/python
import os
# -*- coding: utf-8 -*-
def writeFile(filename, content):
outfile = open(filename, "w")
outfile.write(content)
outfile.close()
def build(versionString):
xmlHeader = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"
xmlResH = "<resources>\n\t"
@jiemachina
jiemachina / gist:4631989
Last active December 11, 2015 17:08
zxing 竖屏截图
public synchronized Rect getFramingRectInPreview(){
int tmpRigth = rect.right;
int tmpLeft = rect.left;
int tmpTop = rect.top;
int tmpBottom =rect.bottom;
rect.left = (tmpTop * cameraResolution.x) /screenResolution.y ;
rect.top = cameraResolution.y - tmpRigth *cameraResolution.y/screenResolution.x;