Skip to content

Instantly share code, notes, and snippets.

View bboalimoe's full-sized avatar

bboalimoe bboalimoe

View GitHub Profile
##request
```
curl -i -X POST -F "filename=@/Users/zhanghengyang/test/201608152045461634649266.jpg" bboalimoe.vicp.io:19337/upload
```
##response
```
{"11": "20090916", "10": "20090916", "1": "\u6d59B7890G", "0": "\u4e2d\u534e\u4eba\u6c11\u5171\u548c\u56fd\u673a\u52a8\u8f66\u884c\u9a76\u8bc1", "3": "\u53f2\u519b", "2": "\u5c0f\u578b\u8f7f\u8f66", "5": "\u975e\u8425\u8fd0", "4": "\u6d59\u6c5f\u7701\u4f1a\u8f7d\u518c\u5170\u6c5f\u8857\u9053\u9ad8\u5341\u82b1U1\u7ca4I\u65e5\u65e5S\u5ba4", "7": "\u5370\u7ae0", "6": "\u660e\u60a6\u724cFV7187TATG", "9": "099Z16", "8": "LFV3A23C08304UZ4UL"}zhangheangdeMBP:test zhanghengyang$
```
@bboalimoe
bboalimoe / 坐标转换.txt
Last active October 15, 2015 06:19
国际通用坐标 --> 火星坐标 --> 百度坐标
/**
* Created by zhanghengyang on 15/8/13.
*/
/**
* Created by zhanghengyang on 15/8/13.
*/
/**
*
@bboalimoe
bboalimoe / softmax.py
Last active August 30, 2015 14:40 — forked from stober/softmax.py
Softmax in Python
#! /usr/bin/env python
"""
Author: Jeremy M. Stober
Program: SOFTMAX.PY
Date: Wednesday, February 29 2012
Description: Simple softmax function.
"""
import numpy as np
npa = np.array
@bboalimoe
bboalimoe / javascript_resources.md
Last active August 29, 2015 14:23 — forked from jookyboi/javascript_resources.md
Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.

Libraries

  • jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
  • Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • AngularJS - Conventions based MVC framework for HTML5 apps.
  • Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
  • lawnchair - Key/value store adapter for indexdb, localStorage
@bboalimoe
bboalimoe / python_resources.md
Last active August 29, 2015 14:23 — forked from jookyboi/python_resources.md
Python-related modules and guides.

Packages

  • lxml - Pythonic binding for the C libraries libxml2 and libxslt.
  • boto - Python interface to Amazon Web Services
  • Django - Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.
  • Fabric - Library and command-line tool for streamlining the use of SSH for application deployment or systems administration task.
  • PyMongo - Tools for working with MongoDB, and is the recommended way to work with MongoDB from Python.
  • Celery - Task queue to distribute work across threads or machines.
  • pytz - pytz brings the Olson tz database into Python. This library allows accurate and cross platform timezone calculations using Python 2.4 or higher.

Guides

@bboalimoe
bboalimoe / 0_reuse_code.js
Last active August 29, 2015 14:23
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
var express = require('express');
//var path = require('path');
var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');
//var todos = require('./routes/todos');
var cloud = require('./cloud');
var log = require("./essential_modules/utils/logger.js").log
var logger = new log("App module");
var app = express();

Senz CI 帮助文档

工作环境

  • Jenkins 持续集成系统工具
  • LeanCloud 测试和生产部署环境
  • DaoCloud 测试和生产部署环境
  • Github 代码库以及版本控制工具
@bboalimoe
bboalimoe / gist:2c5587e7b693721aa123
Created May 30, 2015 04:57
nginx proxy buffering bug
将proxy_buffering 默认为on时,需设置
proxy_buffers 20 1000k;
proxy_buffer_size 20k;
如果关闭proxy buffering,也可解决问题。
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
#### added per benoitc/gunicorn: Issue #790:
####
FORMAT: 1A
HOST: 120.27.30.239:9333
# Location Probability
## Compute Location Probability [/senz/locationprob/]
### Do Compute [POST]