Skip to content

Instantly share code, notes, and snippets.

View MSylvia's full-sized avatar
💭
Compiling ....

Matt Sylvia MSylvia

💭
Compiling ....
View GitHub Profile
@MSylvia
MSylvia / croutonGamepadFix.md
Created November 3, 2017 16:45 — forked from matt-allan/croutonGamepadFix.md
setup dragonrise controllers with crouton

To make dragonrise n64 and snes controllers work with my crouton xfce4/ubuntu chroot, I had to recompile the kernel with support for the hid_dr module. These are the steps to get the controllers working. Almost all steps are taken from the sources listed below. All commands are entered in the chroot's terminal, not the chronos shell.

sudo apt-get install git-core make kernel-package
cd ~
git clone https://chromium.googlesource.com/chromiumos/third_party/kernel -b chromeos-3.8
cd kernel
nano chromeos/config/base.config

type ctrl-w, type 'error_on_warning' and press enter to find the line you need to edit.

@MSylvia
MSylvia / SMBDIS.ASM
Created October 16, 2017 18:22 — forked from 1wErt3r/SMBDIS.ASM
A Comprehensive Super Mario Bros. Disassembly
;SMBDIS.ASM - A COMPREHENSIVE SUPER MARIO BROS. DISASSEMBLY
;by doppelganger ([email protected])
;This file is provided for your own use as-is. It will require the character rom data
;and an iNES file header to get it to work.
;There are so many people I have to thank for this, that taking all the credit for
;myself would be an unforgivable act of arrogance. Without their help this would
;probably not be possible. So I thank all the peeps in the nesdev scene whose insight into
;the 6502 and the NES helped me learn how it works (you guys know who you are, there's no
@MSylvia
MSylvia / .gitignore
Created September 13, 2017 19:56
Unity .gitignore file
/[Ll]ibrary/
/[Tt]emp/
/[Oo]bj/
/[Bb]uild/
/[Bb]uilds/
/Assets/AssetStoreTools*
/Assets/Editor/GitHub.meta
/Assets/Editor/GitHub/
@MSylvia
MSylvia / mvm.lua
Created July 4, 2017 14:22 — forked from usysrc/mvm.lua
micro vm in lua
local MEM = {}
local PC = 0
local registers = {
A = 0,
B = 0,
C = 0,
D = 0
}
local fetch = function()
@MSylvia
MSylvia / rltiles.lua
Created July 4, 2017 14:21 — forked from usysrc/rltiles.lua
roguelike ascii tile display
local data = love.image.newImageData("Alloy_curses_12x12.png")
data:mapPixel(function(x,y,r,g,b,a)
if r == 255 and b == 255 and g ~= 255 then
r,g,b,a = 0,0,0,0
end
return r,g,b,a
end)
local img = love.graphics.newImage(data)
local spritebatch = love.graphics.newSpriteBatch(img, 87*25, "stream")
@MSylvia
MSylvia / latency.txt
Created June 16, 2017 14:53 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers
--------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
#
# Makefile
# AssemblyTest
#
# Part of a sample build pipeline for Apple ][ software development
#
# Created by Quinn Dunki on 8/15/14.
# One Girl, One Laptop Productions
# http://www.quinndunki.com
# http://www.quinndunki.com/blondihacks
@MSylvia
MSylvia / find_rects.cpp
Created March 18, 2017 15:56 — forked from pelya/find_rects.cpp
Find all rectangles in a 2D array, trying to cover as much area with as little amount of rectangles as possible. http://stackoverflow.com/questions/5810649/finding-rectangles-in-a-2d-block-grid
#include <stdlib.h>
#include <vector>
#include <utility>
#include <algorithm>
#include "find_rects.hpp"
namespace FindRects {
/* Algorithm was taken from here: http://stackoverflow.com/a/20039017/624766
@MSylvia
MSylvia / MaximalRectangle.java
Created March 18, 2017 04:51 — forked from mmadson/MaximalRectangle.java
Daveed V's Maximal Rectangle algorithm in Java
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.LinkedList;
import java.util.Scanner;
import java.util.Stack;
final class Cell {
final int col;
final int row;