Skip to content

Instantly share code, notes, and snippets.

View codegoalie's full-sized avatar

Chris Marshall codegoalie

View GitHub Profile
$(document).click(function(e) {
if(e.ctrlKey) {
console.log("Ctrl+Click");
// your code goes here...
} else if(e.altKey) {
console.log("Alt+Click");
} else if(e.shiftKey) {
console.log("Shift+Click");
}
});
@codegoalie
codegoalie / Git Configs
Created November 17, 2009 04:07 — forked from cmarshall/Git Configs
Standard Git Config
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
symlinks = false
ignorecase = true
[branch "master"]
remote = origin
merge = refs/heads/master
@codegoalie
codegoalie / styler.xml
Created January 8, 2010 15:48 — forked from cmarshall/styler.xml
Notepad++ styles
<?xml version="1.0" encoding="Windows-1252" ?>
<NotepadPlus>
<LexerStyles>
<LexerType name="actionscript" desc="ActionScript" ext="">
<!--
<WordsStyle name="DIRECTIVE" styleID="19" fgColor="A001D6" bgColor="363636" fontName="" fontStyle="1" fontSize="" keywordClass="instre2" />
-->
<WordsStyle name="DEFAULT" styleID="11" fgColor="FFFFFF" bgColor="363636" fontName="" fontStyle="0" fontSize="" />
<WordsStyle name="FUNCTION" styleID="20" fgColor="95004A" bgColor="363636" fontName="" fontStyle="0" fontSize="" keywordClass="type2" />
<WordsStyle name="PREPROCESSOR" styleID="9" fgColor="804000" bgColor="363636" fontName="" fontStyle="0" fontSize="" />
@codegoalie
codegoalie / Handy Linux
Created January 13, 2010 19:25
Handy Linux Commands
# Rotate the screen for e-reading
xrandr -o left
xrandr -o normal
# Batch modify 2880x900 .png's down to 1440x900 and then resize 50% with imagemagick
mogrify -crop 1440x900+1440 -resize 50% *.png
#To seach and replace in multiple files:
@codegoalie
codegoalie / Vimrc
Created January 31, 2010 22:01
.vimrc - Vim Config Script
" Modified from An example for a vimrc file.
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last change: 2008 Dec 17
"
" To use it, copy it to
" for Unix and OS/2: ~/.vimrc
" for Amiga: s:.vimrc
" for MS-DOS and Win32: $VIM\_vimrc
" for OpenVMS: sys$login:.vimrc
@codegoalie
codegoalie / Firefox Entensions
Created March 16, 2010 12:32
Firefox Extensions
Foxmarks
Tree Style Tabs
Greasemonkey
Greasefire
Firebug
Enter Selects
Delicious Bookmarks
Download Statusbar
FlashBlock
@codegoalie
codegoalie / nachos-java on Ubuntu
Created October 27, 2010 18:48
These are the steps I took to get nachos-java working on UBuntu 10.10
Setting up NACHOS in Ubuntu Linux
1) Download and Extract the nachos-java.tar.gz
2) Install sun-java6-jdk package. (sudo apt-get install sun-java6-jdk)
3) Add the nachos executable to your PATH, by adding the following lines to your ~/.profile file.
if [ -d "$HOME/nachos/bin" ] ; then
PATH="$HOME/nachos/bin:$PATH"
fi
@codegoalie
codegoalie / bingo.rb
Created February 5, 2011 23:45
Computes pseudo-random bingo cards to fill with a list of items
puts "How many players?"
players = gets.chomp.to_i
puts "How many items?"
items = gets.chomp.to_i
(1..players).each do |i|
puts "card #{i}"
card = Array.new
(1..5).each do |row|
print " "
(1..5).each do |col|
require 'fileutils'
require 'rubygems'
require 'pony'
# Set absolute path for config file directory
conf_path = "/home/auto-responses"
#for each config file (autoresponder)
Dir.new(conf_path).each do |response_file|
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
if [ -n "$PS1" ] ; then
# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoredups:ignorespace