Skip to content

Instantly share code, notes, and snippets.

@xx7y7xx
xx7y7xx / to_geojson.js
Last active Apr 30, 2021
Convert OSM Bbox to GeoJSON
View to_geojson.js
// OSM context
// const boundingBox = window.context.map().extent().bbox();
// const west = boundingBox.minX;
// const east = boundingBox.maxX;
// const north = boundingBox.maxY;
// const south = boundingBox.minY;
east=103.95809871524841
north=1.3401293903131355
south=1.3292472996510163
@xx7y7xx
xx7y7xx / unflatten.js
Last active Sep 11, 2019
Unflatten NC ref data
View unflatten.js
/**
* Unflatten NC ref data
*
* https://gist.github.com/xxd3vin/2dc682f6996ac962bbfbfd7977ef6c1a
*
* input:
*
* ```json
* [
* {
@xx7y7xx
xx7y7xx / pre-commit
Created Apr 6, 2016
Checking file encoding (UTF-8) in svn pre-commit
View pre-commit
#!/bin/bash
# SVN pre-commit hook for "svn-read-only"
##############################################################
#
# FEATURES:
#
# 1) Introduces the "svn-read-only" property for SVN.
#
View createSession.js
var fcVoice = function (voiceCallback) {
/* 标识麦克风按钮状态,按下状态值为true,否则为false */
var mic_pressed = false;
/**
* 初始化Session会话
*/
var session = new IFlyIatSession({
"callback": {
@xx7y7xx
xx7y7xx / timestamp.js
Last active Aug 11, 2017 — forked from hurjas/timestamp.js
Print out a nicely formatted timestamp in JavaScript.
View timestamp.js
/**
* Return a timestamp with the format "yyyy-m-d h:MM:ss TT"
* @type {Date}
*/
function timeStamp() {
// Create a date object with the current time
var now = new Date();
// Create an array with the current month, day and time
@xx7y7xx
xx7y7xx / Example1.md
Last active Aug 11, 2017
移动端报表请求后端地址
View Example1.md
POST /fireport/rptview/view?referAppId=yonyoufi&tenantId=oas6lr3w&op=h5 HTTP/1.1
Host: acc.yonyoucloud.com
Content-Type: application/json
Cache-Control: no-cache
Postman-Token: 8f87c751-b944-12d0-670e-188ee872985e

{
  "code": "MTrendAnalysis",
  "appid": "yonyoufi",
@xx7y7xx
xx7y7xx / README.md
Last active Aug 10, 2017
nginx socket.io proxy
View README.md

show nginx version

# docker exec -it finginx /usr/sbin/nginx -v

restart nginx

# docker restart finginx
View filtered_entity_list.txt
账簿
账簿科目
银行
银行账户
银行类别
单据类型
交易类型
币种
组织
部门
View test.js
This file has been truncated, but you can view the full file.
! function(e) {
function t(n) {
if (o[n]) return o[n].exports;
var r = o[n] = {
i: n,
l: !1,
exports: {}
};
return e[n].call(r.exports, r, r.exports, t), r.l = !0, r.exports