Skip to content

Instantly share code, notes, and snippets.

View kielni's full-sized avatar

Kimberly Nicholls kielni

View GitHub Profile
@kielni
kielni / db.ipynb
Created March 17, 2021 18:34
Query strategy and database bloat
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kielni
kielni / kinosaki-kyoto-osaka.geojson
Created July 2, 2018 04:10
Kinosakionsen to Kyoto to Osaka train route in GeoJSON
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kielni
kielni / tokyo-kyoto-shinkansen.geojson
Created July 2, 2018 04:08
Tokyo to Kyoto shinkansen route in geojson
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kielni
kielni / heic_to_jpg.py
Last active June 24, 2018 02:35
Convert .heic files to .jpg with imagmagick
import os
import os.path
from subprocess import call
'''
install heic dependencies:
brew install libde265
brew install libelf
install imagemagick with libheif
@kielni
kielni / deploy.py
Created October 22, 2017 17:33
command line deploy for python AWS lambda functions
import base64
import os
import zipfile
import boto3
'''
create zip, update function code, invoke function, and print result
set in environment:
@kielni
kielni / FreshThresh.js
Last active August 29, 2015 14:26
Greasmonkey script to hide items on Amazon Fresh category pages that are not on my list, so I can find the stuff I do want. Right click an item picture, then click Not on my list to hide the item. Demo: https://www.youtube.com/edit?video_id=mTDQGyF3Zvs
// ==UserScript==
// @name FreshThresh
// @namespace github.com/kielni
// @description Hide items from Amazon Fresh via right click menu
// @include https://fresh.amazon.com/*
// @version 1
// @grant none
// ==/UserScript==
/*
@kielni
kielni / get_san_jose_camps.js
Created February 15, 2015 05:20
Extract title and description of City of San Jose camp from URL and append to a text file
var request = require("request"),
cheerio = require("cheerio"),
_ = require("lodash"),
fs = require("fs"),
readline = require("readline");
var rl = readline.createInterface(process.stdin, process.stdout);
rl.setPrompt('url> ');
rl.prompt('');
@kielni
kielni / README.md
Last active August 29, 2015 14:06 — forked from ZJONSSON/README.md
d3.legend with line or circle icons

d3.legend

d3.legend is a quick hack to add a legend to a d3 chart. Simply add a g and .call(d3.legend). Any elements that have a title set in the "data-legend" attribute will be included when d3.legend is called. Each title will appear only once (even when multiple items define the same data-legend) as the process uses a set based on a existing names, not an array of all items.

Color

By default the color in the legend will try to match the fill attribute or the stroke attribute of the relevant items. Color can be explicitly defined by attribute "data-legend-color"

Order

The order of items in the legend will be sorted using the top of the bounding box for each included item. The order can be explicitly defined by attribute "data-legend-pos"

@kielni
kielni / README.md
Created June 20, 2014 14:57
Acme Ventures meter 1-forecasts

README is empty

@kielni
kielni / Makefile
Last active August 29, 2015 13:57 — forked from raylu/Makefile
go: go.c
gcc -o go -O go.c -Wall -Wextra -std=c11 -ggdb