Skip to content

Instantly share code, notes, and snippets.

Michael Kosler mkosler

Block or report user

Report or block mkosler

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:25c0727b176ba0a1c28896e6c00443e8
Incantation
Harvest Moon
Power Piggs of the Dark Ages
Kirby Super Star
Maui Mallard in Cold Shadow
Mystery Dungeon: Shiren the Wanderer
Terranigma
Captain Novolin
Rex Ronan: Experimental Surgeon
Packy and Marlon
View dropped_frames.lua
obs = obslua
source_name = ""
last_text = ""
activated = false
obs_output = nil
full_text = 'Dropped frames: '
-- Function to set the time text
View typeshift-solver.py
#!/usr/bin/python
# Arguments:
# A file consisting of all the letters in a column per line.
# For example, a puzzle looking like:
# A B C
# D E F
# G H I
# J K
# L
View libtheoraplayersdl.cpp
#include <cstdlib>
#include <iostream>
#include <SDL.h>
#include <theoraplayer\TheoraPlayer.h>
int main(int argc, char *argv[])
{
if (SDL_Init(SDL_INIT_VIDEO)) {
std::cerr << "Failed to initialize SDL: " << SDL_GetError() << std::endl;
View gist:9300425
{
"default_room": "hallway",
"rooms": [
{
"name": "hallway",
"url": "test_images/hallway.jpg",
"connections": [
{
"name": "living_room",
"coordinates": [ 0, 0, 10 ]
@mkosler
mkosler / controller.js
Last active Aug 29, 2015
TwitchHasAController
View controller.js
$(function () {
$("#controls > div").hide();
$('<canvas id="viewport" width="140" height="65">')
.css("float", "left")
.appendTo("#controls");
$("<button />", {
text: "Show",
@mkosler
mkosler / main.py
Created Feb 17, 2014
TwitchDrawsPokemon
View main.py
import re, socket, time
from PIL import Image
def send(sock, msg):
print(">> {}".format(msg))
sock.send(msg + "\r\n")
if __name__ == "__main__":
IMG = Image.new("RGB", (128, 128), "white")
PIXELS = IMG.load()
@mkosler
mkosler / main.lua
Created Feb 16, 2014
LuaPlaysPokemon
View main.lua
local socket = require("socket")
function getNextMove(commands)
local max = {
command = "",
count = 0,
}
for command, count in pairs(commands) do
if count > max.count then
View gist:8620460
function Level:setMood(mood)
for i,interactive in ipairs(self.interactives) do
if interactive.name == "Barrier" then
interactive.body:setActive(interactive.type ~= mood)
end
end
end
View ball.lua
-- Possible topic:
-- - The require statement
local Manager = require 'manager'
-- Possible topic:
-- - Object-oriented programming
local Ball = Class{}
function Ball:init(x, y, r)
self.x = x
self.y = y
You can’t perform that action at this time.