Skip to content

Instantly share code, notes, and snippets.

View cbmeeks's full-sized avatar
🏠
Working from home

cbmeeks cbmeeks

🏠
Working from home
View GitHub Profile
@cbmeeks
cbmeeks / vic-20-rom.asm
Created July 7, 2017 13:04
VIC-20 ROM Disassembly
;***********************************************************************************;
;***********************************************************************************;
;
; The almost completely commented VIC 20 ROM disassembly. V1.01 Lee Davison 2005-2012.
; With enhancements by Simon Rowe <srowe@mose.org.uk>.
; This is a bit correct assembly listing for the VIC 20 BASIC and KERNAL ROMs as one 16K
; ROM. You should be able to assemble the VIC ROMs from this with most 6502 assemblers,
; as no macros or 'special' features were used. This has been tested using Michal
; Kowalski's 6502 Simulator assemble function. See http://exifpro.com/utils.html for
@cbmeeks
cbmeeks / SMBDIS.ASM
Created July 5, 2017 14:02 — forked from 1wErt3r/SMBDIS.ASM
A Comprehensive Super Mario Bros. Disassembly
;SMBDIS.ASM - A COMPREHENSIVE SUPER MARIO BROS. DISASSEMBLY
;by doppelganger (doppelheathen@gmail.com)
;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
@cbmeeks
cbmeeks / test1.java
Created March 7, 2017 14:42
Java Sets Unique?
package com.company;
import java.util.HashSet;
import java.util.Set;
public class Main {
public static class Test {
private String blah;
@cbmeeks
cbmeeks / times.js
Created December 20, 2016 15:23
Times in 15 minute increments for the day
var times = [];
for(var hour = 0; hour < 24; hour++) {
for(var mins = 0; mins < 60; mins = mins + 15) {
var m = "0" + mins;
if (hour < 12)
times.push( (hour === 0 ? 12 : hour) + ":" + (m.substr(1, 2) === "0" ? "00" : m.substr(1, 2)) + " AM");
else
times.push( ((hour - 12) === 0 ? 12 : hour - 12) + ":" + (m.substr(1, 2) === "0" ? "00" : m.substr(1, 2)) + " PM");
}
@cbmeeks
cbmeeks / backup_repos.cmd
Created October 19, 2016 14:19
Backup GitHub public repos into folders: YYYY_MM_DD_HHmm
@echo off
rem Create folder that is to the minute in YYYY_MM_DD_HHMM format
for /f "delims=" %%a in ('wmic OS Get localdatetime ^| find "."') do set dt=%%a
set now=%dt:~0,4%_%dt:~4,2%_%dt:~6,2%_%dt:~8,2%%dt:~10,2%
mkdir %now%
chdir %now%
rem Pull down repos
svn export https://github.com/jacgoudsmit/L-Star.git
renderer: function (value) {
if (value) {
var millis = value;
var year = new Date(millis).getFullYear();
var month = new Date(millis).getMonth();
var day = new Date(millis).getUTCDate();
return Ext.util.Format.date(new Date(year, month, day, 0, 0, 0), 'm-d-Y');
}
return null;
@cbmeeks
cbmeeks / CORSFilter.java
Last active June 9, 2016 18:13 — forked from zeroows/CORSFilter.java
To enable CORS support in Spring MVC 4 - Access-Control-Allow-Origin
package com.elm.mb.rest.filters;
import java.io.IOException;
import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.logging.Log;
@cbmeeks
cbmeeks / EWoz 1.0
Created February 22, 2016 19:41 — forked from BigEd/EWoz 1.0
Extended Woz monitor for 6502 by fsafstrom after Steve Wozniak
EWoz 1.0
by fsafstrom » Mar Wed 14, 2007 12:23 pm
http://www.brielcomputers.com/phpBB3/viewtopic.php?f=9&t=197#p888
via http://jefftranter.blogspot.co.uk/2012/05/woz-mon.html
The EWoz 1.0 is just the good old Woz mon with a few improvements and extensions so to say.
It's using ACIA @ 19200 Baud.
It prints a small welcome message when started.
All key strokes are converted to uppercase.
@cbmeeks
cbmeeks / propeller_colors.spin
Created January 8, 2016 18:42
Propeller Color Values
{{
──────────────────────────────────────────────
Color Encoding Table
──────────────────────────────────────────────
C3 - C0 = Chroma Phase Shift
M = Modulation Enable
L2 - L0 = Luma Value
──────────────────────────────────────────────
Bit Encoding
Signal C3 C2 C1 C0 M L2 L1 L0
@cbmeeks
cbmeeks / _optimization.java
Last active December 10, 2015 17:23
Optimization
@Theme("demo")
public class OptimizationUI extends UI {
private static final long serialVersionUID = 8621351077936927377L;
@Override
public void init(VaadinRequest request) {
String str = "<table width=\"100%\"><tr><td width=\"600px\"></td><td></td></tr>";