Skip to content

Instantly share code, notes, and snippets.

View joshuaconner's full-sized avatar

Joshua Conner joshuaconner

View GitHub Profile
@joshuaconner
joshuaconner / docker_pull_print_output.py
Last active August 29, 2015 14:00
client.pull() output from docker-py
import docker.client
client = docker.Client()
stream = client.pull('bowery/java', stream=True)
for chunk in stream:
print "\n\n\n%s" % chunk

Keybase proof

I hereby claim:

  • I am joshuaconner on github.
  • I am jconner (https://keybase.io/jconner) on keybase.
  • I have a public key whose fingerprint is 5E09 50F9 8567 0E75 E107 BD9D AA83 B273 6BBE 2B47

To claim this, I am signing this object:

@joshuaconner
joshuaconner / README.md
Last active August 29, 2015 14:02 — forked from mbostock/.block

This choropleth encodes unemployment rates from 2008 with a quantize scale ranging from 0 to 15%. A threshold scale is a useful alternative for coloring arbitrary ranges.

This is a D3.js Heatmap example showing how the highest sun position of the day (which directly correlates with average temperature) changes over the year depending on the latitude of the place. The actual temperature chart would be shifted to the right a bit beacuse of thermal lag.

The data for the chart is calculated using SunCalc.

@joshuaconner
joshuaconner / fullwidth.sh
Last active October 24, 2021 21:51
fullwidth unicode converter in bash
# fullwidth() - converts input into full-width unicode
fullwidth() {
local readonly ARGS="$@"
# fast_chr and unichr from: http://stackoverflow.com/a/23436040/604614
fast_chr() {
local __octal
local __char
printf -v __octal '%03o' $1
printf -v __char \\$__octal
@joshuaconner
joshuaconner / mysql_splitdump.sh
Last active August 29, 2015 14:26 — forked from jasny/mysql_splitdump.sh
Split MySQL dump SQL file into one file per table or extract a single table
#!/bin/bash
####
# Split MySQL dump SQL file into one file per table
# based on http://blog.tty.nl/2011/12/28/splitting-a-database-dump
####
if [ $# -lt 1 ] ; then
echo "USAGE $0 DUMP_FILE [TABLE]"
exit