Skip to content

Instantly share code, notes, and snippets.

View kyleconroy's full-sized avatar
⌨️
Developing sqlc

Kyle Gray kyleconroy

⌨️
Developing sqlc
View GitHub Profile
@kyleconroy
kyleconroy / gist:5278517
Last active December 15, 2015 14:59
Use websockets to receive Github repo events
var connection = new WebSocket('ws://socktocat.org/hooks?repo=:owner/:repo');
// Log events from Github
connection.onmessage = function (e) {
var events = JSON.parse(e.data); // An array of Github events
console.log(events);
};
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>11B26</string>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>physfs</string>
var lua = require('../lib/core');
var tmp = null;
var _checkers_1 = lua.newtable();
lua.tableset(_checkers_1, 'eq', (function (_x, _y) {
var tmp;
lua.call(lua.assert, [lua.eq(_x, _y), lua.concat(_x, lua.concat(" should equal ", _y))]);
return [];
}));
@kyleconroy
kyleconroy / gist:4527516
Created January 14, 2013 03:12
automatically generated javascript from lua
var lua = require('../lib/core');
var tmp = null;
var _math_1 = lua.newtable();
var _check_1 = lua.call(lua.require, ['luascripts/checkers'])[0];
lua.tableset(_math_1, 'add', (function (_x, _y) {
var tmp;
return [lua.add(_x, _y)];
return [];
}))
lua.tablegetcall(_check_1, 'eq', [lua.tablegetcall(_math_1, 'add', [3, 3])[0], 6]);
package com.projecthawkthorne.trampoline;
import com.badlogic.gdx.ApplicationListener;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.Input.Keys;
import com.badlogic.gdx.assets.AssetManager;
import com.badlogic.gdx.assets.loaders.TileMapRendererLoader.TileMapParameter;
import com.badlogic.gdx.graphics.GL10;
import com.badlogic.gdx.graphics.OrthographicCamera;
import com.badlogic.gdx.graphics.g2d.tiled.TileMapRenderer;

State of the Subreddit: 11,000 subscribers is just the start

First off, big round of applause to everyone for another milestone! We now have over 11,000 subscribers. According to the redditlist, that means that we are the #776 largest subreddit. Cool. Cool. Cool cool cool.

I just want to thank everyone for being part of such a great fanbase. I love working on this game, and I hope you love playing it. All the contributors have made this game a reality, and I'm so thankful you've come along for the ride.

local Gamestate = require 'vendor/gamestate'
local sound = require 'vendor/TEsound'
local ringbuffer = require 'vendor/ringbuffer'
local Timer = require 'vendor/timer'
local state = Gamestate.new()
local soundtrack = ringbuffer.new(
'abeds-castle',
'abeds-town',
@kyleconroy
kyleconroy / gist:3809456
Created October 1, 2012 04:22
Hawkthorne Roadmap
## Framework
- Persistent key-value store
- Weapons
- Enemies
- Cutscenes
- Transitions
- Events (so the game knows when something happens)
- Money (killed from enemies)
- Boss AI
<?
function splitMessage($text){
$result = array();
// Implementation here
return $result;
}
$longMessage = "Hello there how are you"; // Make this longer
@kyleconroy
kyleconroy / test.py
Created April 20, 2012 21:40 — forked from RobSpectre/test.py
Failure to patch accurately
import unittest
from mock import patch
class Class:
def __init__(self):
self.foo = 'bar'
class TestClass(unittest.TestCase):
@patch('__main__.Class')
def test_class(self, MockClass):