Skip to content

Instantly share code, notes, and snippets.

View knoguchi's full-sized avatar

Kenji Noguchi knoguchi

View GitHub Profile
@knoguchi
knoguchi / clickhousedump
Last active March 18, 2022 22:02 — forked from inkrement/clickhousedump
dump all clickhouse databases and tables
#!/bin/bash
OUTDIR=.
IGNORE_DBS="system information_schema INFORMATION_SCHEMA default tmp"
# supply options here as needed
CLIENT="clickhouse-client"
$CLIENT -q "SHOW DATABASES" | while read -r db ; do
$CLIENT -q "SHOW TABLES FROM $db" | while read -r table ; do
@knoguchi
knoguchi / fitbit_auth_example.py
Created June 17, 2019 02:07 — forked from aparrish/fitbit_auth_example.py
A simple Tornado application that implements OAuth login and authenticated requests for Fitbit.
# simple tornado app that implements fitbit oauth login.
# requires tornado 2.4-ish. run on the command line like so:
# $ python fitbit_auth_example.py --port=<your port> \
# --fitbit_consumer_key=<your consumer key> \
# --fitbit_consumer_secret=<your consumer secret>
#
# make sure to set your fitbit app's callback URL to
# http://your-app-url.example.com/login
import tornado.web