Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View surmon-china's full-sized avatar
🧘‍♂️

Surmon surmon-china

🧘‍♂️
View GitHub Profile
@surmon-china
surmon-china / README.md
Last active June 5, 2022 11:21
Export footprint JSON from Apple photos.
@surmon-china
surmon-china / index.js
Created February 25, 2017 19:05
vue中使用disqus
/**
* Vue-disqus
* @author Surmon.me
*/
const DisqusComponent = require('./disqus.vue')
const disqus = {
install: function(Vue) {
Vue.component('disqus-box', DisqusComponent)
@Saul-Mirone
Saul-Mirone / mini-express.js
Last active November 15, 2019 12:36
Just An Express Style Framework
const http = require('http')
const url = require('url')
const path = require('path')
const fs = require('fs')
const mime = {
"html": "text/html",
"css": "text/css",
"js": "text/javascript",
"json": "application/json",
"gif": "image/gif",
/**
* 百度坐标(BD09)、国测局坐标(火星坐标,GCJ02)、和WGS84坐标系之间的转换的工具
*
* 参考 https://github.com/wandergis/coordtransform 实现的Java版本
* @author geosmart
*/
public class CoordinateTransformUtil {
static double x_pi = 3.14159265358979324 * 3000.0 / 180.0;
// π
static double pi = 3.1415926535897932384626;
@branneman
branneman / better-nodejs-require-paths.md
Last active April 8, 2024 00:22
Better local require() paths for Node.js

Better local require() paths for Node.js

Problem

When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:

const Article = require('../../../../app/models/article');

Those suck for maintenance and they're ugly.

Possible solutions