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
▶ c2fo WM-292 ✗ node test-csv.js test.csv | |
test.csv | |
[ { header1: '1-1', header2: '1-2', header3: '1-3' }, | |
{ header1: '2-1', header2: '2-2', header3: '2-3' }, | |
{ header1: '3-1', header2: '3-2', header3: '3-3' } ] | |
▶ c2fo WM-292 ✗ node | |
> let val1 = false; | |
undefined | |
> t = require('./test-csv') | |
{ newTable: [Function: newTable] } |
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
# run create-react-app | |
# npm install --save graphiql | |
# edit App.js to look like this... | |
# enable CORS on your GraphQl API (http://0.0.0.0:4000 below) | |
import React, { Component } from 'react'; | |
import logo from './logo.svg'; | |
import './App.css'; | |
import '../node_modules/graphiql/graphiql.css'; |
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
open -a Google\ Chrome --args --disable-web-security --user-data-dir |
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
▶ master ✗ sudo "/Applications/Postgres.app/Contents/Versions/9.4/bin/psql" -Ufocker -ddev -p5445 | |
psql (9.4.11) | |
Type "help" for help. | |
dev=# create extension "pgcrypto"; | |
CREATE EXTENSION | |
sms_us_dev=# \q |
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
// Place your key bindings in this file to overwrite the defaults | |
[ | |
{ "key": "cmd+,", "command": "workbench.action.navigateBack" }, | |
{ "key": "cmd+.", "command": "workbench.action.navigateForward" } | |
] |
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
https://www.postgresql.org/docs/9.4/static/monitoring-stats.html | |
https://www.postgresql.org/docs/9.4/static/functions-admin.html | |
-- show blocking pids in a nice tree | |
-- query as blocked_query | |
-- 9.6++ | |
select pid, usename, | |
age(query_start, clock_timestamp()), | |
pg_blocking_pids(pid) as blocked_by, | |
query |
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
#!/usr/bin/env bash | |
# fresh-chrome | |
# | |
# Use this script on OS X to launch a new instance of Google Chrome | |
# with its own empty cache, cookies, and user configuration. | |
# | |
# The first time you run this script, it will launch a new Google | |
# Chrome instance with a permanent user-data directory, which you can | |
# customize below. Perform any initial setup you want to keep on every |
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
"use strict"; | |
console.log(process.env.TZ); | |
// process.env.TZ = "Asia/Shanghai"; | |
let moment = require('moment'); | |
const format = "YYYY-MM-DD"; | |
let d, dUTC, dTZ, dJS; | |
const hours = ["00","01","02","03","04","05","06","07","08","09","10","11","12", | |
"13","14","15","16","17","18","19","20","21","22","23","24"]; |
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
'use strict'; | |
/** | |
* This shows the currency formatting by locales. | |
* To add a new locale just update the locales var below. | |
* | |
* To run: | |
* `node translations/tasks/example_outputs.js` to view the output. | |
*/ |
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
// for our internal time | |
saverTimer := logger.Timer() | |
var totalParseTime time.Duration | |
var totalTime time.Duration | |
for { | |
row, err := csvReader.ReadMap(false) | |
... | |
start := time.Now() |
NewerOlder