Skip to content

Instantly share code, notes, and snippets.

View frankhale's full-sized avatar
🎮
writing games

Frank Hale frankhale

🎮
writing games
View GitHub Profile
@frankhale
frankhale / list-weeks-of-year.js
Last active December 22, 2016 20:21
Print a list of weeks of the year starting on Jan 1
const moment = require("moment"),
_ = require("lodash");
function getWeeksOfYearList(startDate, endDate) {
let dates = [],
keepGoing = true,
start = moment(startDate),
end = moment(endDate),
rolling = start;
@frankhale
frankhale / youtube-search.js
Last active July 7, 2016 18:09
Proposed fix for issue #15 on YouTube Search
var querystring = require('querystring')
var xhr = require('xhr')
if (!xhr.open) xhr = require('request')
var allowedProperties = [
'fields',
'channelId',
'channelType',
'eventType',
@frankhale
frankhale / new-toby-data-format.txt
Last active December 7, 2015 18:43
A new format for Toby's data file
EDM Sets {
Trance mix 2014 - Armin Van BuurenW&WPaul Oakenfold : p68MTskBUnM
Progressive Trance Top 10 (February 2014) / New Trance Mix / Paradise : g2L0OWterVg
Goodbye 2013 Mix (Progressive Trance House Trouse Uplifting Melodic Vocal) : RLVs7Csdmf8
Best of Progressive & Melodic Trance 2013 Yearmix [5 Hour Set] [HD] - Shane Collins - APJ #32 : seBS2MEtALE
Arctic Moon Megamix - best tracks & remixes : aX00On-X7K8
Seven Lions Mix (Hour Long Melodic Dubstep / Trancestep Mix) : 7KfKft2lcog
BEST OF VOCAL TRANCE | MIX#4 : VZT9HGsv01A
This Was The Summer Of Hardstyle 2013 : kQko_qnKoW4
Incredible Emotional Vocal Trance Mix l April 2015 (Vol 26) : 3l2FHxVd71o
@frankhale
frankhale / electron-irc-client.txt
Created November 13, 2015 04:47
Look mom, I made a IRC client...
Look mom, I made a IRC client...
@frankhale
frankhale / new-text-adventure-game-engine.txt
Created November 8, 2015 16:26
Some notes / screenshots on my text adventure game engine
- Gonna try to add screenshots to this gist
@frankhale
frankhale / text-adventure-data-format.txt
Last active November 6, 2015 18:15
A pseudo data format for a hypothetical text adventure game engine (I'm assuming stuff which is not shown or documented yet)
text
1 You are in the Foyer of the Opera House. This room has doors to the south and
1 west, also an unusable exit to the north. The room is quiet and you don't see
1 anyone around.
2 You are in the cloak room. The room resembles a large walk in closet. You see
2 a brass hook on the wall.
3 You are in the bar and it is extremely dark, you cannot see anything right
3 now. You can't even see if there is a light switch.
4 You take off your cloak and hang it up on the hook.
6 Because you disturbed the room while moving around in the dark you made the
@frankhale
frankhale / cloak-of-darkness.txt
Last active November 6, 2015 00:00
A hypothetical data file for an interactive fiction engine capable of playing a Cloak of Darkness clone
rooms
1 Opera House Foyer
1 You are in the Foyer of the Opera House. This room has doors to the south and
1 west, also an unusable exit to the north. The room is quiet and you don't see
1 anyone around.
2 Cloak Room
2 You are in the cloak room. The room resembles a large walk in closet. You see
2 a brass hook on the wall.
3 The Bar
3 You are in the bar and it is extremely dark, you cannot see anything right
@frankhale
frankhale / devcards-error-clojure18beta1.txt
Created October 14, 2015 14:48
Error message when starting devcards using Clojure 1.8.0-beta1
Exception in thread "main" java.lang.VerifyError: (class: cljs/util$last_modified, method: invokeStatic signature: (Ljava/lang/Object;)Ljava/l
ang/Object;) Can only throw Throwable objects, compiling:(util.cljc:142:1)
at clojure.lang.Compiler$DefExpr.eval(Compiler.java:463)
at clojure.lang.Compiler.eval(Compiler.java:6918)
at clojure.lang.Compiler.load(Compiler.java:7360)
at clojure.lang.RT.loadResourceScript(RT.java:372)
at clojure.lang.RT.loadResourceScript(RT.java:363)
at clojure.lang.RT.load(RT.java:453)
at clojure.lang.RT.load(RT.java:419)
at clojure.core$load$fn__5669.invoke(core.clj:5885)
@frankhale
frankhale / helloworld.fs
Created October 7, 2015 02:28
An F# IHttpHandler hello,world
type HelloWorldHandler() =
interface IHttpHandler with
member this.IsReusable
with get() = false
member this.ProcessRequest(context:HttpContext) =
context.Response.ContentType <- "text/html"
context.Response.Write("<b>I love F# OMG!</b>")
@frankhale
frankhale / main.cljs
Last active August 29, 2015 14:01
My first attempt to port the main.js of the Hello, World atom-shell application to Clojurescript. This does not currently work because atom-shell thinks my application is invalid.
(ns main.core)
(def app (js/require "app"))
(def browser-window (js/require "browser-window"))
(def crash-reporter (js/require "crash-reporter"))
(def main-window (atom nil))
(defn init-browser []
(reset! main-window (browser-window. (clj->js {:width 800 :height 600})))