Skip to content

Instantly share code, notes, and snippets.

@mkosler
mkosler / p1.cpp
Last active December 1, 2020 20:52
Advent of Code 2020: Day 1
#include <iostream>
#include <string>
#include <sstream>
#include <vector>
int main(int argc, char* argv[])
{
std::vector<int> expenses;
std::stringstream ss;
@mkosler
mkosler / nightbot-dice-roll.js
Created November 19, 2020 17:21
Nightbot variable dice roll
!commands edit !roll $(eval var c = isNaN(parseInt(`$(query)`)) ? 20 : parseInt(`$(query)`); `d${c}: ${Math.floor(Math.random() * c) + 1}`)

The Legend of Zelda: A Link to the Past

Hyrule Castle

  1. Get Torch in room.
  2. Left at entrance
  3. Two green guards, line up with bottom pole, move between right most walls
  4. Get boomerang in left room with guard.
  5. Chain guard: 2 pots or 8 slashes
  6. Cross, dark room: Key in right arm
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
obs = obslua
source_name = ""
last_text = ""
activated = false
obs_output = nil
full_text = 'Dropped frames: '
-- Function to set the time text
@mkosler
mkosler / typeshift-solver.py
Created March 25, 2017 14:14
I got frustrated ;)
#!/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
#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;
{
"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 August 29, 2015 13:56
TwitchHasAController
$(function () {
$("#controls > div").hide();
$('<canvas id="viewport" width="140" height="65">')
.css("float", "left")
.appendTo("#controls");
$("<button />", {
text: "Show",
@mkosler
mkosler / main.py
Created February 17, 2014 00:53
TwitchDrawsPokemon
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()