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
# You don't need Fog in Ruby or some other library to upload to S3 -- shell works perfectly fine | |
# This is how I upload my new Sol Trader builds (http://soltrader.net) | |
# Based on a modified script from here: http://tmont.com/blargh/2014/1/uploading-to-s3-in-bash | |
S3KEY="my aws key" | |
S3SECRET="my aws secret" # pass these in | |
function putS3 | |
{ | |
path=$1 |
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
[ | |
{ | |
"district_code": "110000", | |
"district_name": "北京市" | |
}, | |
{ | |
"district_code": "110100", | |
"district_name": "北京市", | |
"district_pcode": "110000" | |
}, |
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
(function (angular) { | |
'use strict'; | |
angular.register = register; | |
angular.invoke = invoke; | |
var funcs = []; | |
var cache = {}; | |
//注册 | |
function register(name, func) { | |
var obj = { | |
key: name, |
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
(function(results) { | |
let els = $('p.MsoNormal'); | |
for (let i = 0, size = els.length, prev; i < size; i++) { | |
let text = $(els[i]).text(); | |
let ary = text.split(/\s+/); | |
let code = ary[0]; | |
let name = ary[1]; | |
let level = text.split(/\s/).length - 1; |