Skip to content

Instantly share code, notes, and snippets.

@hiiamyes
hiiamyes / day-1.trailjson
Last active March 15, 2018 05:01
HikeJSON & TrailJSON
[
{
"type": "node",
"node": {
"name": "塔塔加登山口",
"time": "09:00",
"stayTime": 0
}
},
{
@hiiamyes
hiiamyes / demo.js
Last active January 7, 2018 06:02
osm-ways-to-geojson
const axios = require("axios");
const querystring = require("querystring");
const _ = require("lodash");
const fs = require("fs");
const path = require("path");
const osmWays = [
{
// 三六九到黑森林入口
id: 464086142,
@hiiamyes
hiiamyes / constants.js
Last active December 8, 2017 06:40
osm-ways-to-coordinates
const osmWays = [
{
id: 411938960,
start: 1518876285,
end: 1518875913
},
{
id: 464086142,
end: 1518876742
}
@hiiamyes
hiiamyes / deploy.sh
Last active November 30, 2017 02:17
gek web deployment
#!/bin/bash
project="pronect-name"
zone="us-east1-b"
cluster="cluster-name"
namespace="namespace-if-needed"
tput setaf 2; echo "Deploying..."
tput sgr0;
@hiiamyes
hiiamyes / Styled.js
Last active November 24, 2017 10:00
typography
import styled from 'styled-components';
import { forDesktopDown } from '../../styles/breakpoints';
export default styled.span`
&.display4 {
}
&.display3 {
font-size: 130px;
line-height: 130px;
${forDesktopDown} {
@hiiamyes
hiiamyes / gist:3408d79acd376647b432edd6167c2d11
Created November 19, 2017 14:14
nginx-express-pm2-setup
# Default server configuration
#
server {
listen 80 default_server;
listen [::]:80 default_server;
# SSL configuration
#
# listen 443 ssl default_server;
# listen [::]:443 ssl default_server;
@hiiamyes
hiiamyes / .eslintrc
Created October 5, 2017 16:47
my eslist rule
{
"extends": "airbnb",
"globals": {
"L": false // leaflet
},
"rules": {
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }],
"react/prop-types": [0],
"import/no-extraneous-dependencies": [0]
}
@hiiamyes
hiiamyes / tra-booking.html
Created September 28, 2017 13:47
TRA Booking Selenium IDE
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="selenium.base" href="http://railway.hinet.net/" />
<title>訂票程式</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
@hiiamyes
hiiamyes / sql-tdd.markdown
Created September 28, 2017 02:36 — forked from abrkn/sql-tdd.markdown
Migrations and testing for PostgreSQL using node.js and Travis-CI

Migrations and testing for PostgreSQL using node.js and Travis-CI

We're looking to add a column to the table user called admin (boolean) in an existing database.

Project layout

migrations
@hiiamyes
hiiamyes / gpx-analyzer.js
Created September 26, 2017 18:46
gpx-analyzer
const pino = require("pino");
var pretty = pino.pretty();
pretty.pipe(process.stdout);
var log = pino(
{
name: "app",
safe: true
},
pretty
);