Skip to content

Instantly share code, notes, and snippets.

@xx7y7xx
xx7y7xx / kepler-gl-geojson.csv
Created December 9, 2022 07:58
Kepler.gl GeoJSON sample data
name geojson
Foo {"type":"FeatureCollection","features":[{"type":"Feature","properties":{},"geometry":{"coordinates":[[[-122.44360237541633,37.805104195436556],[-122.56758965927739,37.78861363342382],[-122.56595286345073,37.71322758505134],[-122.3580797934791,37.73653104382794],[-122.44360237541633,37.805104195436556]]],"type":"Polygon"}}]}
Bar {"type":"FeatureCollection","features":[{"type":"Feature","properties":{},"geometry":{"coordinates":[[[-122.55323007935363,37.69380335041262],[-122.56177025564907,37.61717593579718],[-122.31979859394755,37.63746735867393],[-122.35395929912926,37.71632577274761],[-122.55323007935363,37.69380335041262]]],"type":"Polygon"}}]}
@xx7y7xx
xx7y7xx / mw1.csv
Created August 10, 2022 03:50
Able to draw bubbles with size and color/transparency based on different variables.
id lat lng fr
1 1.2686455612039458 103.81719589233398 0.12
2 1.268945894958813 103.82565021514893 0.23
3 1.263325357489324 103.81728172302246 0.46
4 1.2634969771342761 103.82569313049315 0.78
@xx7y7xx
xx7y7xx / a.csv
Created April 8, 2022 03:40
a.csv
mex_id lat lng Val timestamp
A 1.2651917205192 103.821052908897 1 1647532800
A 1.2651917205192 103.821052908897 2 1647536400
A 1.2651917205192 103.821052908897 3 1647540000
A 1.2651917205192 103.821052908897 4 1647543600
@xx7y7xx
xx7y7xx / to_geojson.js
Last active April 30, 2021 08:16
Convert OSM Bbox to GeoJSON
// 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 / createSession.js
Created August 15, 2017 08:01
创建session
var fcVoice = function (voiceCallback) {
/* 标识麦克风按钮状态,按下状态值为true,否则为false */
var mic_pressed = false;
/**
* 初始化Session会话
*/
var session = new IFlyIatSession({
"callback": {
@xx7y7xx
xx7y7xx / timestamp.js
Last active August 11, 2017 06:58 — forked from hurjas/timestamp.js
Print out a nicely formatted timestamp in JavaScript.
/**
* 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 August 11, 2017 05:37
移动端报表请求后端地址
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 August 10, 2017 15:29
nginx socket.io proxy

show nginx version

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

restart nginx

# docker restart finginx
@xx7y7xx
xx7y7xx / filtered_entity_list.txt
Last active June 28, 2017 06:12
过滤实体表
账簿
账簿科目
银行
银行账户
银行类别
单据类型
交易类型
币种
组织
部门
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
}