Skip to content

Instantly share code, notes, and snippets.

View justinjones's full-sized avatar

Justin Jones justinjones

View GitHub Profile
@justinjones
justinjones / lambda.cr
Created December 5, 2018 02:07
Amber Prototype - AWS Lambda Runtime, API Gateway (Proxy)
require "http/client"
require "http/request"
require "http/params"
require "http/server/response"
require "http/server/context"
require "../config/*"
class ApiGatewayEvent
include JSON::Serializable
// My solution to Reddit /r/dailyprogrammer challenge #200
// http://www.reddit.com/r/dailyprogrammer/comments/2v0tx4/20150206_challenge_200_hard_box_in_a_box/
package main
import (
"bufio"
"fmt"
"math/rand"
"os"
@justinjones
justinjones / desktop-switcher.scpt
Created May 31, 2012 02:26
AppleScript for setting your desktop to an image from Desktoppr
-- Usage: osascript /path/to/desktop-switcher.scpt
-- Requires: "JSON Helper" from the mac app store (free)
-- Downloads a random wallpaper from desktoppr.co and sets it to your desktop wallpaper
-- Use at your own risk.
-- creates a wallpapers folder in downloads directory and delete anything in it (from previous runs)
set wallpapersFolder to POSIX path of (path to downloads folder as string) & "wallpapers"
do shell script "mkdir -p " & wallpapersFolder
do shell script "rm -f " & wallpapersFolder & "/*.wallpaper"
@justinjones
justinjones / lol-champions.json
Created January 27, 2012 12:45
League of legends champion data in JSON format
[ { "desc" : "Unlike other foxes that roamed the woods of southern Ionia, Ahri had always felt a strange connection to the magical world around her; a connection that was somehow incomplete. Deep inside, she felt the skin she had been born into was an ill fit for her and dreamt of one day...",
"id" : 103,
"name" : "Ahri",
"tags" : [ "assassin",
"mage",
"ranged"
]
},
{ "desc" : "There exists an ancient order originating in the Ionian Isles dedicated to the preservation of balance. Order, chaos, light, darkness -- all things must exist in perfect harmony for such is the way of the universe. This order is known as the Kinkou and it employs a triumvirate...",
"id" : 84,