Skip to content

Instantly share code, notes, and snippets.

Avatar

Nick zorchenhimer

View GitHub Profile
@zorchenhimer
zorchenhimer / cobol-packed-numbers.py
Created Jun 26, 2015
Pack and unpack COBOL's COMP-3 numbers.
View cobol-packed-numbers.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Pack and unpack COBOL's COMP-3 numbers.
Cobol stores most numbers as strings. There are times that they are stored in a
packed format ("Computational numbers"). Comp numbers are not stored like
traditional numbers (16-bit, 32-bit, 64-bit, etc), but in a bit length that is
four times the number of digits in the stored value plus four bits. For a
View .vimrc
syntax on
filetype on
filetype indent on
filetype plugin on
set autochdir
set autoindent
set backspace=2
set backspace=indent,eol,start
set expandtab
@zorchenhimer
zorchenhimer / remove-win10-spyware.bat
Created Sep 22, 2015
Remove all the nasty stuff that was backported to Windows 7 and 8 from Windows 10.
View remove-win10-spyware.bat
@echo off
AT > NUL
if %ERRORLEVEL% EQU 1 (
echo Error: Not running as administrator.
echo Please right click the batch file and select 'Run as Administrator'
exit /b 1
)
echo Uninstalling bad updates...
@zorchenhimer
zorchenhimer / NES_Build_Environment.md
Last active Aug 1, 2019
Setting up a build environment for the NES with cc65
View NES_Build_Environment.md

Setting up a NES Build environment

This setup will allow you to assemble the NES projects I've got up on GitHub.

Requirements

View vars-in-ops.asm
;; cmp word [ball_x], WIDTH - BALL_WIDTH
ref_x: cmp word 30, WIDTH - BALL_WIDTH
;; the "+ 1" here is the size of the "cmp word" opcode
;; ball_x will point to the memory address of "30" above
%define ball_x (ref_x + 1)
View movienightspam_v2.go
package main
import (
"flag"
"fmt"
"strconv"
"time"
"github.com/gorilla/websocket"
)
View keybase.md

Keybase proof

I hereby claim:

  • I am zorchenhimer on github.
  • I am zorchenhimer (https://keybase.io/zorchenhimer) on keybase.
  • I have a public key ASDAk1nnUuzAbuJFNEEfA3oJ-fb1a8JApMxJiYeBystavAo

To claim this, I am signing this object:

@zorchenhimer
zorchenhimer / add-crc.pl
Last active Aug 29, 2015
Add or verify CRC32 checksums in filenames.
View add-crc.pl
#!/usr/bin/perl
use strict;
use warnings;
use Getopt::Long;
use Pod::Usage;
use Digest::CRC;
# Disable output buffer
$|++;
View sort.py
#!/usr/bin/python
"""
Bogo Sort is best sort.
"""
import random
import time
import copy
def check_sort(lst):