Skip to content

Instantly share code, notes, and snippets.

View WillSams's full-sized avatar
🚀

Will Sams WillSams

🚀
View GitHub Profile
@WillSams
WillSams / odb-sqlite-install
Last active August 29, 2015 14:03
ODB Install for sqlite
sudo su #do your installs as root
mkdir /opt/odb
cd /opt/odb
wget http://www.codesynthesis.com/download/odb/2.3/odb_2.3.0-1_amd64.deb
wget http://www.codesynthesis.com/download/odb/2.3/libodb-2.3.0.zip
wget http://www.codesynthesis.com/download/odb/2.3/libodb-sqlite-2.3.0.zip
sudo dpkg -i odb*.deb
@WillSams
WillSams / pygame-install-instructions
Last active August 29, 2015 14:17
Pygame installation on Debian/Ubuntu
cd ~/Projects/Python
#install dependencies
sudo apt-get install mercurial python-dev python-numpy libxine2-ffmpeg \
libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev libsmpeg-dev \
libsdl1.2-dev libportmidi-dev libswscale-dev libavformat-dev libavcodec-dev
# Grab source
hg clone https://bitbucket.org/pygame/pygame
@WillSams
WillSams / log4j.xml
Created March 31, 2015 14:26
My log4j configuration
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration PUBLIC "-//log4j/log4j Configuration//EN" "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
<appender name="STDOUT" class="org.apache.log4j.ConsoleAppender">
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d %-5p %c.%M:%L - %m%n"/>
</layout>
</appender>
@WillSams
WillSams / decorators.xml
Created March 31, 2015 14:27
My Sitemesh configuration
<decorators defaultdir="/WEB-INF/templates">
<!-- <excludes>
<pattern>/content/styles/*</pattern>
<pattern>/content/scripts/*</pattern>
<pattern>/content/images/*</pattern>
</excludes> -->
<decorator name="main" page="layout.jsp">
<pattern>/*</pattern>
</decorator>
@WillSams
WillSams / web.xml
Last active August 29, 2015 14:18
My web.xml configuration for Struts2 projects
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0">
<display-name>stormgames</display-name>
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
@WillSams
WillSams / pygamedev
Created July 4, 2015 19:04
PygameDev
#install dependencies
sudo apt-get install mercurial python-dev python-numpy ffmpeg \
libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev libsmpeg-dev \
libsdl1.2-dev libportmidi-dev libswscale-dev libavformat-dev libavcodec-dev
# Grab source
hg clone https://bitbucket.org/pygame/pygame
# Finally build and install
cd pygame
@WillSams
WillSams / CSharp-Mode.xshd
Created September 24, 2012 12:47 — forked from marcusholmgren/CSharp-Mode.xshd
VibrantInk inspired syntax highligthing for C# in SharpDevelop
<?xml version="1.0" encoding="utf-8"?>
<!--This file was autogenerated by the #Develop highlighting editor.-->
<!--VibrantInk inspired syntax highligthing for C# in #Develop.-->
<SyntaxDefinition name="C#" extensions=".cs">
<Environment>
<Custom name="TypeReference" bold="false" italic="false" color="Pink" />
<Custom name="UnknownEntity" bold="false" italic="false" color="Yellow" />
<Default bold="false" italic="false" color="White" bgcolor="Black" />
<Selection bold="false" italic="false" color="White" bgcolor="#6897BB" />
<VRuler bold="false" italic="false" color="Pink" bgcolor="#E3E3E3" />
@WillSams
WillSams / ConfigProxy.cs
Created October 17, 2012 13:29
Configuration Helper file to use with Iron Python apps. Just compile it from the command-line.
//ConfigProxy.cs
// Taken modified:
// http://tomestephens.com/2011/02/making-ironpython-work-overriding-the-configurationmanager/
// http://tomestephens.com/2011/02/extending-my-ironpython-toolset/
// command line compile: csc /target:library /out:ConfigProxy.dll ConfigProxy.cs
// In IronPython, to load up your config file:
// import clr
// clr.AddReference('System.Core')
// clr.AddReference('System.Xml')
// clr.AddReference('System.Configuration')
@WillSams
WillSams / Notepad2.ini
Last active October 11, 2015 19:48
My Notepad2 settings
[Notepad2]
;Notepad2.ini=%WINDIR%\Notepad2-%USERNAME%.ini
;Notepad2.ini=%APPDATA%\Notepad2.ini
[Settings]
SaveSettings=1
SaveRecentFiles=0
SaveFindReplace=0
CloseFind=0
CloseReplace=0
NoFindWrap=0
@WillSams
WillSams / gist:3933697
Created October 22, 2012 19:56 — forked from defnull/gist:1224387
Deploy a Bottle app on Heroku
mkdir heroku
cd heroku/
virtualenv --no-site-packages env
source env/bin/activate
pip install bottle gevent
pip freeze > requirements.txt
cat >app.py <<EOF
import bottle
import os