This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\A | |
(?:(?=[AMD])(A?M?D?)=)? # destination | |
( | |
[AMD][+\-&|][AMD1] | # binary operations | |
[\-!]?[AMD01] # unary operations | |
) | |
(?:;J([GL][ET]|EQ|NE|MP))? # jump | |
\Z |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
begin | |
raise VMTranslatorError.new("Only enter the name of one .vm file or the name of a directory") if ARGV.length > 1 | |
raise VMTranslatorError.new("File does not exist") unless File.exists?(ARGV.first) | |
if File.directory? ARGV.first | |
files = Dir.glob(File.join(ARGV.first, '*.vm')) | |
raise VMTranslatorError.new("No .vm files in #{ARGV.first}") unless files.length > 0 | |
outfile = File.join(ARGV.first, File.basename(ARGV.first)) | |
else | |
raise VMTranslatorError.new("Not a .vm file") unless ARGV.first =~ /\A(.+)\.vm\Z/i |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<root> | |
<item> | |
<name>Home Row Arrow Mode</name> | |
<list> | |
<item> | |
<name>What's "Home Row Arrow Mode"?</name> | |
<appendix>Single Key Press Semicolon turns on "Home Row Arrow Mode"</appendix> | |
<appendix>Then you can use JKIL as Left/Down/Up/Right.</appendix> | |
<appendix>Also, U = home, O = end, H = page up, and N = page down.</appendix> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Random Number Generator | |
Original author: Taylor Wacker | |
Modified by: Connor McKay | |
This is a pseudo random number generator that uses the | |
Linear Congruential Generator (LCG) to generate random | |
numbers. | |
*/ | |
class Random { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#SingleInstance force | |
; Necessary for semicolon arrow to work, since it can send semicolon. | |
#InstallKeybdHook | |
; Better performance. | |
SendMode Input | |
; Kill CapsLock. | |
SetCapsLockState AlwaysOff |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
ci = commit | |
cia = commit --amend | |
cian = commit --amend --no-edit | |
st = status | |
pl = pull | |
cp = cherry-pick | |
cps = cherry-pick --strategy=subtree -x | |
co = checkout | |
df = diff |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#if [ -f ~/.bash_common ]; then | |
# . ~/.bash_common | |
#fi | |
export CLICOLOR=1 | |
export PS1="\[\e[7;32m\]\u\[\e[0m\] \[\e[7;36m\]\w\[\e[27;32m\]\$ \[\e[0m\]" | |
export EDITOR=vim | |
alias ll="ls -lh" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Threader | |
def initialize(max_threads = 50) | |
@max_threads = max_threads | |
@wait_queue = Queue.new | |
@tasks = [] | |
@running_tasks = Set.new | |
@done_tasks = Set.new | |
end | |
# Add a task. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [ "$DISPLAY" ] | |
then | |
xmodmap - <<-EOF | |
! semicolon held movement commands: | |
! j = left | |
! k = down | |
! l = right | |
! i = up | |
! u = home |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Windows Registry Editor Version 5.00 | |
[HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions\Default%20Settings] | |
"Colour0"="220,220,205" | |
"Colour1"="220,220,205" | |
"Colour2"="44,44,44" | |
"Colour3"="44,44,44" | |
"Colour4"="44,44,44" | |
"Colour5"="220,220,205" | |
"Colour6"="112,144,128" |
OlderNewer