Skip to content

Instantly share code, notes, and snippets.

Mathias Hansen MiniCodeMonkey

Block or report user

Report or block MiniCodeMonkey

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@MiniCodeMonkey
MiniCodeMonkey / geocodio_batch_output.json
Created Nov 11, 2019
Geocodio Sample output for a batch of two addresses
View geocodio_batch_output.json
{
"results": [
{
"query": "1109 N Highland St, Arlington VA",
"response": {
"input": {
"address_components": {
"number": "1109",
"predirectional": "N",
"street": "Highland",
@MiniCodeMonkey
MiniCodeMonkey / tailwind-1-color-update.js
Created Jun 3, 2019
Replaces tailwind 0.x color CSS classes with 1.0 names
View tailwind-1-color-update.js
const fs = require('fs');
const path = require('path');
/**
* Replaces tailwind 0.x color CSS classes with 1.0 names
* E.g. "bg-grey-light" is replaced with "bg-gray-400"
*
* This is a "dumb" replacement that searches for string patterns across the
* specified files,
*
View address_test_forward_geocoding.csv
We can make this file beautiful and searchable if this error is corrected: It looks like row 7 should actually have 15 columns, instead of 1. in line 6.
latitude,longitude,full_address,Latitude,Longitude,"Accuracy Score","Accuracy Type",Number,Street,City,State,County,Zip,Country,Source
35.67077925703927,-78.82521725019633,"108 BOATDOCK DR, HOLLY SPRINGS, NC 27540",35.670773,-78.825206,1,rooftop,108,"Boatdock Dr","Holly Springs",NC,"Wake County",27540,US,Cary
35.86182403271283,-78.53973585742347,"5305 FORSYTH PARK ST, RALEIGH, NC 27616",35.831189,-78.659428,0.6,street_center,,"Forsyth St",Raleigh,NC,"Wake County",27609,US,"TIGER/Line® dataset from the US Census Bureau"
35.760958787507256,-78.88079964780793,"7020 JENKS RD, UNINCORPORATED, NC 27519",35.760953,-78.880796,1,rooftop,7020,"Jenks Rd",Cary,NC,"Wake County",27519,US,Cary
35.93202626254228,-78.5683112135329,"2759 HIDDEN WATERS CIR, RALEIGH, NC 27614",35.932033,-78.568314,1,rooftop,2759,"Hidden Waters Cir",Raleigh,NC,"Wake County",27614,US,Wake
35.90069083020205,-78.66516671549235,"1505 PECORE PL, RALEIGH, NC 27615",35.900698,-78.665169,1,rooftop,1505,"Pecore Pl",Raleigh,NC,"Wake County",27615,US,Wake
3
@MiniCodeMonkey
MiniCodeMonkey / convert.sh
Last active Feb 11, 2016
PNG to 3d object for 3d printing
View convert.sh
#!/bin/sh
for f in *.png
do
filename=${f%.*}
echo "Processing $filename"
# png -> bmp
convert $filename.png -normalize -fx 'a==0 ? white : u' $filename.bmp
# trace bitmap to eps
View curl.sh
curl -X POST \
-H "Content-Type: application/json" \
-d '{"KeyA": "42370 Bob Hope Drive, Rancho Mirage CA", "KeyB": "1290 Northbrook Court Mall, Northbrook IL", "KeyC": "4410 S Highway 17 92, Casselberry FL", "KeyD": "15000 NE 24th Street, Redmond WA", "KeyE": "17015 Walnut Grove Drive, Morgan Hill CA"}' \
https://api.geocod.io/v1/geocode?api_key=YOUR_API_KEY
View wp_rand.php
<?php
if ( !function_exists('wp_rand') ) :
/**
* Generates a random number
*
* @since 2.6.2
*
* @param int $min Lower limit for the generated number
* @param int $max Upper limit for the generated number
* @return int A random number between min and max
View PowerTrim.php
<?php
$query = trim($query, " \t\n\r\0\x0B,.:|?!+=()[]{}@#$%^&_-");
View geocodio.json
{
"name": "Geocodio",
"description": "Ridiculously cheap bulk geocoding",
"image": "http://geocod.io/img/logo_inv_original.png",
"url": "https://geocod.io",
"type": "default",
"version": "1.0",
"apis": [
{
View keybase.md

Keybase proof

I hereby claim:

  • I am MiniCodeMonkey on github.
  • I am codemonkey (https://keybase.io/codemonkey) on keybase.
  • I have a public key whose fingerprint is 0A47 EC1B 192E 0C3D D8F9 F664 662E C10B A1F5 A3A9

To claim this, I am signing this object:

@MiniCodeMonkey
MiniCodeMonkey / bootswatch-picker.js
Last active Feb 1, 2016
Paste this in your JavaScript console to easily switch between Bootswatch styles to help pick the right one for your site
View bootswatch-picker.js
var themes = [
'//netdna.bootstrapcdn.com/bootswatch/3.3.6/cerulean/bootstrap.min.css',
'//netdna.bootstrapcdn.com/bootswatch/3.3.6/cosmo/bootstrap.min.css',
'//netdna.bootstrapcdn.com/bootswatch/3.3.6/cyborg/bootstrap.min.css',
'//netdna.bootstrapcdn.com/bootswatch/3.3.6/darkly/bootstrap.min.css',
'//netdna.bootstrapcdn.com/bootswatch/3.3.6/flatly/bootstrap.min.css',
'//netdna.bootstrapcdn.com/bootswatch/3.3.6/journal/bootstrap.min.css',
'//netdna.bootstrapcdn.com/bootswatch/3.3.6/lumen/bootstrap.min.css',
'//netdna.bootstrapcdn.com/bootswatch/3.3.6/paper/bootstrap.min.css',
'//netdna.bootstrapcdn.com/bootswatch/3.3.6/readable/bootstrap.min.css',
You can’t perform that action at this time.