Skip to content

Instantly share code, notes, and snippets.

View adituv's full-sized avatar

Iris Ward adituv

View GitHub Profile
@adituv
adituv / denki.lua
Last active October 17, 2015 15:33
Denki Blocks Lua
--[[
Denki Blocks - BizHawk Lua Overlay
Version 1.0.0
Contributions by AdituV
You may use, edit, and redistribute this file under the
condition that this notice is left intact, and attribution
is provided for all contributions as above.
]]
@adituv
adituv / keybase.md
Created September 13, 2015 22:34
keybase.md

Keybase proof

I hereby claim:

  • I am adituv on github.
  • I am adituv (https://keybase.io/adituv) on keybase.
  • I have a public key whose fingerprint is 798A 393A 8BE6 7A6C 060D 8D06 86D6 0E51 3A2B 000F

To claim this, I am signing this object:

@adituv
adituv / aditubot.py
Created May 26, 2016 20:12
Twitch chatbot prototype with Sopel
from sopel.module import commands, rule, rate
import queue
import threading
import time
###############################################################################
## SECTION: chat commands ##
###############################################################################
@commands('help')
@adituv
adituv / 000readme.md
Last active June 26, 2016 23:14
GH3 - show title

Show Song Title

The below script is the rough skeleton of a script to draw the song title at the top left.

I attempted to translate it the language used by the Tony Hawk modding community to describe QB scripts, but can't guarantee it's entirely correct. Further, it uses an opcode (0x4B) that wasn't available in at least the early Tony Hawk games (though probably was in THAW and onwards); I have denoted that as * in my scripts as it seems to be vaguely similar to C's pointer dereference.

@adituv
adituv / .bash_prompt
Last active August 29, 2016 17:58
.bash_prompt
#!/bin/bash
PS1='\[$clr\](\[$bold$green\]$git_branch\[$clr\]$git_status_short) '
PS1+='\[$bold$blue\]$pwd_short\[$clr\]\$ '
export PS1
clr=$'\e[0m'
bold=$'\e[1m'
green=$'\e[32m'
blue=$'\e[34m'
@adituv
adituv / .zshrc
Created September 8, 2016 18:23
oh-my-zsh zshrc
# Path to your oh-my-zsh installation.
export ZSH=/home/aditu/.oh-my-zsh
# Configuration for Powerline theme
# Hide context when in this user's context
DEFAULT_USER="aditu"
POWERLEVEL9K_MODE='awesome-fontconfig'
POWERLEVEL9K_STATUS_VERBOSE=false
@adituv
adituv / tmp_generate_dbg_pak.cs
Last active October 16, 2016 09:36
tmp_generate_dbg_pak
using System;
using System.Collections.Generic;
using System.IO;
namespace tmp_generate_dbg_pak
{
class Program
{
// Generates a stub "dbg.pak.xen" file from a filename checksum listing
// One entry per line in the listing, tab separated. Checksum (no 0x), then the path
@adituv
adituv / main.idr
Created October 23, 2016 22:05
Idris attempt?
module Main
import Data.Vect
toVect : List a -> ( n:Nat ** Vect n a )
toVect Nil = ( 0 ** Nil )
toVect (x :: xs) with (toVect xs)
| (n ** ys) = ( S n ** x :: ys )
listFromString : String -> List Int
@adituv
adituv / main.cpp
Created February 16, 2017 23:31
SDL Gamepad Input Stuff
#include <cstdio>
#include <string>
#include <vector>
#include <SDL.h>
void logJoystickEvent(SDL_Event e);
std::string showHatState(Uint8 hat);
int main(int argc, char* argv[]) {
// Detect first gamepad on which a key is pressed, then log its events.
@adituv
adituv / existentials.idr
Last active October 24, 2018 02:10
Existential types in idris
module Main
import Data.Vect
exists : {k : Type} -> (k -> Type) -> Type
exists t = (b : Type) -> ({a : _} -> t a -> b) -> b
packExists : {k : Type} -> {t : k -> Type} -> {a : k} -> t a -> exists t
packExists x = \b, f => f x