Skip to content

Instantly share code, notes, and snippets.

curl -X POST -u "mobanbot:githubtoken" -d "{\"title\": \"sync with moban\", \"body\":\"test\", \"base\": \"master\", \"head\": \"mobanbot:master\"}" -H "Accept: application/vnd.github.shadow-cat-preview+json" https://api.github.com/repos/pyexcel/pyexcel-xlsxr/pulls
-------
Isochrone
https://en.wikipedia.org/wiki/Isochrone_map
import time
time.monotonic()
import pytz
len(pytz.common_timezones)
https://www.iana.org/time-zones
@chfw
chfw / gist:d11eb7bd8f478eede112c8e316ca3a7f
Created December 11, 2018 09:07
database replication using mariadb
https://www.tecmint.com/mariadb-master-slave-replication-on-centos-rhel-debian/
CHANGE MASTER TO MASTER_HOST='10.154.0.2' MASTER_USER='slave' MASTER_PASSWORD='SlavePassword' MASTER_PORT=3306 MASTER_LOG_FILE='mariadb-bin.000001' MASTER_LOG_POS=602 MASTER_CONNECT_RETRY=10;
MASTER_USE_GTID=current_pos is deprecated
resolve: {
extensions: ['.js', '.jsx']
},
from tornado.websocket import WebSocketHandler
from tornado.web import Application, RequestHandler
from tornado.ioloop import IOLoop
HTML = """
<html>
<div id="messages"></div>
<script>
var ws = new WebSocket("ws://localhost:8888/websocket");
create an instance in gcloud
you need java
sudo apt install openjdk-8-jre-headless
then following these commands
wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add -
sudo sh -c 'echo deb http://pkg.jenkins-ci.org/debian binary/ > /etc/apt/sources.list.d/jenkins.list'
#{} would escape your json
!{} would not, but not clearly documented
https://github.com/angular/protractor/issues/4307
use node 7.10.0 -> browser.pause() works
c -> next
any other versions of Node, browser.pause() wont work
@chfw
chfw / gist:8c0ab53c974f2e81691bafbffc991a86
Created December 15, 2017 23:10
install apache superset on ubuntu 17.04 server edition
sudo apt-get update
sudo apt-get install liabssl-dev libsasl2-dev
then python setup.py install inside incubator-superset