Skip to content

Instantly share code, notes, and snippets.

@digarok
digarok / apple_ii_hires_lines.py
Last active November 28, 2017 14:59
prints out the base addresses of the apple ii hi res screen
addrs = [0x2000, 0x2028, 0x2050] # 3) 'top','middle','bottom' base addresses
for addr in addrs:
for b in range(0, 8): # 2) and those 8-line bars are striped each 0x80 bytes
lineaddr = addr
for l in range(0, 8): # 1) 8 consecutive lines are spaced by 0x400 bytes
print(hex(lineaddr))
lineaddr = lineaddr + 0x400
addr = addr + 0x80
@hdragomir
hdragomir / sm-annotated.html
Last active June 13, 2024 03:01
The deferred font loading logic for Smashing Magazine. http://www.smashingmagazine.com/
<script type="text/javascript">
(function () {
"use strict";
// once cached, the css file is stored on the client forever unless
// the URL below is changed. Any change will invalidate the cache
var css_href = './index_files/web-fonts.css';
// a simple event handler wrapper
function on(el, ev, callback) {
if (el.addEventListener) {
el.addEventListener(ev, callback, false);
@afair
afair / tmux.cheat
Last active June 3, 2024 23:26
Tmux Quick Reference & Cheat sheet - 2 column format for less scrolling!
========================================== ==========================================
TMUX COMMAND WINDOW (TAB)
========================================== ==========================================
List tmux ls List ^b w
New new -s <session> Create ^b c
Attach att -t <session> Rename ^b , <name>
Rename rename-session -t <old> <new> Last ^b l (lower-L)
Kill kill-session -t <session> Close ^b &