I hereby claim:
- I am drocamor on github.
- I am drocamor (https://keybase.io/drocamor) on keybase.
- I have a public key ASAeaNEjXiG_J2c8hv_9BPvEFmZS42ml7b4HRu0Cl9Vc9go
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| { | |
| "AWSTemplateFormatVersion": "2010-09-09", | |
| "Description": "Simple CoreOS install", | |
| "Parameters": { | |
| "GistURL": { | |
| "Description": "URL to a github gist with your public key", | |
| "Type": "String" | |
| }, | |
| "KeyName": { | |
| "Description": "EC2 keypair name", |
| (ns networks.core | |
| (:refer-clojure :exclude [==]) | |
| (:use [clojure.core.logic]) | |
| (:require [clojure.core.logic.fd :as fd])) | |
| (defn bit-ando | |
| "Ensure that r is a bitwise AND of x and y." | |
| [x y r] | |
| (conde | |
| [(== 0 x) (== 0 y) (== 0 r)] |
| #!/usr/bin/env python | |
| import shapefile | |
| # Get the shapefile from here: http://efele.net/maps/tz/world/ | |
| sf = shapefile.Reader("/Users/drocamor/Downloads/world/tz_world.shp") | |
| # I took this from here: http://geospatialpython.com/2011/08/point-in-polygon-2-on-line.html | |
| # Improved point in polygon test which includes edge | |
| # and vertex points |
| #!/bin/bash | |
| # | |
| # git pre-commit hook to make sure you are commiting properly formatted CloudFormation code | |
| # This should go in .git/hooks/pre-commit in a repo with CFN templates. | |
| if git-rev-parse --verify HEAD >/dev/null 2>&1; then | |
| against=HEAD | |
| else | |
| against=4b825dc642cb6eb9a060e54bf8d69288fbee4904 | |
| fi |
| ;; beautify json | |
| (defun beautify-json () | |
| (interactive) | |
| (let ((b (if mark-active (min (point) (mark)) (point-min))) | |
| (e (if mark-active (max (point) (mark)) (point-max)))) | |
| (shell-command-on-region b e | |
| "python -mjson.tool" (current-buffer) t))) |
| # -*- coding: utf-8 -*- | |
| # <nbformat>3.0</nbformat> | |
| # <headingcell level=1> | |
| # The Game World | |
| # <codecell> |
| #!/bin/bash | |
| TMPFILE=`mktemp /tmp/prettyjson.XXXXXX` || exit 1 | |
| python -mjson.tool $1 > $TMPFILE || exit 1 | |
| mv $TMPFILE $1 || exit 1 |
| (ns shuffler.core) | |
| (defn shuffle-a-deck [] | |
| """Shuffles one deck of cards""" | |
| (clojure.string/join "," (shuffle (range 0 52)))) | |
| ;; this is an infinite number of shuffled decks of cards | |
| (def shuffled-decks (repeatedly shuffle-a-deck)) | |
| (defn find-a-dup [seq index] | |
| """Finds the first duplicate in a seq""" |
| # BEGIN W3TC Browser Cache | |
| <IfModule mod_deflate.c> | |
| <IfModule mod_setenvif.c> | |
| BrowserMatch ^Mozilla/4 gzip-only-text/html | |
| BrowserMatch ^Mozilla/4\.0[678] no-gzip | |
| BrowserMatch \bMSIE !no-gzip !gzip-only-text/html | |
| BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html | |
| </IfModule> | |
| <IfModule mod_headers.c> | |
| Header append Vary User-Agent env=!dont-vary |