Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View wizardishungry's full-sized avatar
🐫
Copyright 1987-2013, Larry Wall

Jon Williams wizardishungry

🐫
Copyright 1987-2013, Larry Wall
View GitHub Profile
@wizardishungry
wizardishungry / vmm-alpine.sh
Last active May 22, 2020 18:04 — forked from voutilad/vmm-alpine.sh
Installing Alpine Linux in OpenBSD's VMM Hypervisor and setup k3s
# Assuming you're a regular user that has doas allowances for vmctl
mkdir -p ~/vmm
cd ~/vmm
# Grab the the one of the virt iso's of Alpine Linux
curl http://dl-cdn.alpinelinux.org/alpine/v3.11/releases/x86_64/alpine-virt-3.11.6-x86_64.iso -o alpine-virt-3.11.6-x86_64.iso
# Make a new virtual disk image, change the size as needed. Make one for each node.
doas vmctl create -s 2G alpine-virt1.img
doas vmctl create -s 2G alpine-virt2.img
@wizardishungry
wizardishungry / community-builds-from-source.sh
Last active January 14, 2018 03:06 — forked from Chaircrusher/community-builds-from-source.sh
This script pulls down the VCV Rack community repo, finds source urls, pulls down source repos, and builds plugins.
#!/usr/bin/env bash
#################################################################################################################################
# community-builds-from-source.sh
# by Jeremy Wentworth
#
# Modified by Kent Williams chaircrusher@gmail.com
# Modified by Jon Williams jon@jonwillia.ms
#
# This script pulls down the VCV Rack community repo, finds source urls, pulls down source repos, and builds plugins.
@wizardishungry
wizardishungry / ssl_puma.sh
Last active February 8, 2017 17:51 — forked from tadast/ssl_puma.sh
localhost SSL with puma
# 1) Create your private key (any password will do, we remove it below)
$ cd ~/.ssh
$ openssl genrsa -out server.key 2048
# 2) Generate the csr (Certificate signing request) (Details are important!)
$ openssl req -new -key server.key -out server.csr
This file has been truncated, but you can view the full file.
étui
études
étude
étagères
étagère
épées
épée
émigrés
émigré
élan

Download and convert data from NYC open data portal

curl -o nynta.zip "https://nycopendata.socrata.com/api/geospatial/cpf4-rkhq?method=export&format=Shapefile"
cd nynta_12c

ogr2ogr can't deal with the projection directly. Replace content of nynta.prj with the following projection string:

PROJCS["NAD_1983_StatePlane_New_York_Long_Island_FIPS_3104_Feet",GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["lambert_conformal_conic_2sp"],PARAMETER["False_Easting",984250.0],PARAMETER["False_Northing",0.0],PARAMETER["longitude_of_center",-74.0],PARAMETER["Standard_Parallel_1",40.66666666666666],PARAMETER["Standard_Parallel_2",41.03333333333333],PARAMETER["latitude_of_center",40.16666666666666],UNIT["Foot_US",0.3048006096012192]]

<?php
namespace Money;
class Bitcoin {
#const BITCOIN_NODE = '173.224.125.222'; // w001.mo.us temporary
const BITCOIN_NODE = '50.97.137.37';
static private $pending = array();
public static function update() {
//
// Using CoreLocation on Mac OS X with command-line
// $ clang CoreLocationTest.m -framework cocoa -framework CoreLocation
// $ ./a.out
// location service enabled
// 2011-12-01 21:03:01.839 a.out[10214:903] latitude,logitude : 35.606647, 140.695538
// 2011-12-01 21:03:01.842 a.out[10214:903] timestamp : 2011-12-01 21:01:36 +0900
// tmiz moo@tmiz.net
//
#import <cocoa/cocoa.h>
<?php
/**
* A controller plugin for protecting forms from CSRF
*
* Works by looking at the response and adding a hidden element to every
* form, which contains an automatically generated key that is checked
* on the next request against a key stored in the session
*
* @author Jani Hartikainen <firstname at codeutopia net>
*/
@wizardishungry
wizardishungry / ison.py
Last active December 14, 2015 14:59 — forked from kjordahl/garradd.py
#!/usr/bin/env python2.6
# -*- coding: iso-8859-15 -*-
"""Calculate position for comet
Author: Kelsey Jordahl
Time-stamp: <Sun Feb 26 12:28:17 EST 2012>
License: GPLv3
"""
import ephem
PANTS: HELLO ??? AM I LATE FOR BURNING MAN ??? IT IS COLD
PANTS: THEY PROMISED FOUR AND TWENTY BLACKBIRDS
PANTS: THIS IS MORE LIKE FOUR HUNDRED AND TWENTY BLACK DICKS ALL AT ONCE (WITHOUT REMORSE OR AN OUNCE OF POLITENESS I MIGHT ADD)