Skip to content

Instantly share code, notes, and snippets.

Avatar

Will Sams WillSams

View GitHub Profile
@WillSams
WillSams / odb-sqlite-install
Last active Aug 29, 2015
ODB Install for sqlite
View odb-sqlite-install
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 Aug 29, 2015
Pygame installation on Debian/Ubuntu
View pygame-install-instructions
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 / decorators.xml
Created Mar 31, 2015
My Sitemesh configuration
View decorators.xml
<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 Aug 29, 2015
My web.xml configuration for Struts2 projects
View web.xml
<?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 / log4j.xml
Created Mar 31, 2015
My log4j configuration
View log4j.xml
<?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>
View 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 Sep 24, 2012 — forked from marcusholmgren/CSharp-Mode.xshd
VibrantInk inspired syntax highligthing for C# in SharpDevelop
View CSharp-Mode.xshd
<?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 Oct 17, 2012
Configuration Helper file to use with Iron Python apps. Just compile it from the command-line.
View ConfigProxy.cs
//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 Oct 11, 2015
My Notepad2 settings
View Notepad2.ini
[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 Oct 22, 2012 — forked from defnull/gist:1224387
Deploy a Bottle app on Heroku
View gist:3933697
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
You can’t perform that action at this time.