Skip to content

Instantly share code, notes, and snippets.

View rpazyaquian's full-sized avatar

Rebecca Paz rpazyaquian

View GitHub Profile
# CHIP-8 emulator, work in progress
# RAM array: 4 kilobytes (4096 unsigned 8-bit integers). First 512 elements are taken up by the interpreter, 0x200 to 0xFFF are free.
ram = bytearray(4096)
# Variable registers: 16 8-bit variable registers. Referred to as VX, where X is a hexadecimal digit (V0, VF, etc.)
v = bytearray(16) # VX = v[x], where x is a number between 0 and 15 (corresponding to 0 through F)
-- The results of Joins are equivalent to everything that evaluates to true in these comparisons:
-- INNER JOIN:
-- "A && B" == "A and also B"
-- FULL JOIN:
-- "A || B" == "A or B or both"
-- LEFT JOIN:
-- "A || (A && B)" == "A with or without B"
nerve-gulpfile () {
echo "// using https://github.com/gulpjs/gulp/blob/master/docs/recipes/fast-browserify-builds-with-watchify.md
var gulp = require('gulp');
// browserify + watchify
var browserify = require('browserify');
var watchify = require('watchify');
// other stuff for watchify
var source = require('vinyl-source-stream');
/*global describe, it */
'use strict';
(function () {
describe('Chip8', function () {
describe('RAM', function () {
it('has 4096 bytes', function () {
expect(Chip8.ram.length).toEqual(4096);
@rpazyaquian
rpazyaquian / new-react-project-checklist.md
Last active August 29, 2015 14:26
New React Project Checklist

New React Project Checklist

This is a list of things you need to accomplish to start up a new React project.

Have you...

  1. Run git init?
  2. Run npm init?
  3. Created .gitignore?
  4. Made sure node_modules is in .gitignore?
  5. Installed React? npm install react --save
@rpazyaquian
rpazyaquian / pr-template.md
Last active September 10, 2015 21:10
New PR Template

Intent

This is a template for a new pull request (PR). There are particular expectations upon engineers for communicating their changes to reviewers in a proper and useful manner. This template intends to make this as easy as possible and to reduce the amount of times that a reviewer has to go over the PR.

Template

**References [ticket-name](ticket-link).**

### Original Problem
api_test_from_scratch () {
RAILS_ENV=test ruby test/create_test_databases.rb
RAILS_ENV=test bundle exec rake db:test:prepare
RAILS_ENV=test bundle exec rake db:schema:load
RAILS_ENV=test bundle exec rake test $1
}
api_test_from_scratch TEST=./test/controllers/heartbeat_controller_test.rb
@rpazyaquian
rpazyaquian / new-jira.md
Last active January 12, 2016 14:36
New JIRA Ticket Template

New JIRA Ticket Template

This is a template for creating a new JIRA ticket. It explains the problem in question and the motivation for addressing it, as well as the requirements for this ticket being "completed" expressed in one or two sentences.

Native JIRA format:

h3. Problem
@rpazyaquian
rpazyaquian / pmdmml.man
Created February 29, 2016 17:01
ssg stuff
-------------------------------------------------------------------------------
§6-1-2 Timbre - SSG Sound Source Options
-------------------------------------------------------------------------------
The MML compiler has 10 built-in envelopes for the SSG sound source, applicable with the E command.
The following envelopes are available:
@0 E0,0,0,0 Default
@1 E2,-1,0,1 Synth type 1
@2 E2,-2,0,1 Synth type 2
@rpazyaquian
rpazyaquian / libwar.clj
Created March 11, 2016 18:44
libwar - A library for playing War.
(ns libwar.domain)
;; Domain data structures and knowledge for war.
;; A War game
;; War has two players, and current state.
(def war-example
{:p1 {:deck [{:type :red