Skip to content

Instantly share code, notes, and snippets.

View thesven's full-sized avatar

Michael Svendsen thesven

  • Toronto, Ontario.
View GitHub Profile
@thesven
thesven / gist:2696699
Created May 14, 2012 20:41
Quick check....
<!DOCTYPE html>
<html>
<head>
<title> Assignment Check Test</title>
</head>
<body>
<div id="myValue">
</div>
@thesven
thesven / Time.java
Created March 17, 2012 01:25
PlayN Timer
package com.thesven.game.core.time;
import static playn.core.PlayN.*;
import playn.core.util.Callback;
public class Time {
public boolean running = false;
@thesven
thesven / gif2png.sh
Created February 3, 2012 21:04
Convert gif image frames to png files w/ the help of ImageMagick
#!/bin/bash
#requires the following:
#download and install macports - http://www.macports.org/install.php (.pkg installer)
#Install ImageMagick though macports - sudo port install ImageMagick
GIF_FILE=$1
ROOT_EXPORT_NAME=$2
convert $GIF_FILE -coalesce $ROOT_EXPORT_NAME%04d.png
@thesven
thesven / keyboard_code_enums.js
Created December 17, 2011 02:10 — forked from huobazi/keyboard_code_enums.js
Javascript Keycode Enums
var enums = {};
enums.map = {};
enums.map.keys = [
"SPACE_BAR",
"BACKSPACE",
"TAB",
"ENTER",
"SHIFT",
"CTRL",
"ALT",
@thesven
thesven / .bash_profile
Created November 25, 2011 21:31
Bash Profile OS X
echo "Hello Michael, You are great at turning me on."
### ----------
### PATH SETTINGS
### ----------
PATH=/applications/MacVim/:$PATH
### ----------
### Archive
### ----------
alias tarc="tar -zcf"
@thesven
thesven / install-lamp.sh
Created October 25, 2011 00:17 — forked from mpezzi/install-lamp.sh
Ubuntu 10.04 / LAMP + Drush + Drupal Sandboxes
#! /bin/bash
# Upgrade and install required packages.
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install lamp-server^
sudo apt-get install php5-cli php5-gd php5-curl phpmyadmin
# Configure Apache
sudo sed -ie 's/AllowOverride None/AllowOverride All/g' /etc/apache2/sites-available/default
@thesven
thesven / HTML age dropdown
Created April 6, 2011 18:22
age drop down from 1-100
<?php
for($i = 1; $i <= 100; $i += 1){
echo("<option value='{$i}'>{$i}</option>");
}
?>
<select id="state" name="state">
<option value="">Select One</option>
<optgroup label="Canadian Provinces">
<option value="AB">Alberta</option>
<option value="BC">British Columbia</option>
<option value="MB">Manitoba</option>
<option value="NB">New Brunswick</option>
<option value="NF">Newfoundland</option>
<option value="NT">Northwest Territories</option>
<option value="NS">Nova Scotia</option>