Skip to content

Instantly share code, notes, and snippets.

View WillSams's full-sized avatar
🚀

Will Sams WillSams

🚀
View GitHub Profile
@WillSams
WillSams / sdl2-pkgs-install.sh
Last active January 8, 2023 14:25
Script to get SDL2 up & running on your system
#SCRIPTVERSION="2014.06.16-Debian"
SCRIPTVERSION="2022.12.13-Debian"
SCRIPTNAME="sdl2-pkgs-install.sh"
SCRIPTFULLNAME="$0"
BUILDDIR=/tmp/sdlbuild
sudo bash -c "apt update"
sudo bash -c "apt install libxext-dev build-essential automake autoconf libtool -y"
sudo bash -c "apt install mesa-common-dev libasound2-dev libpulse-dev -y"
sudo bash -c "apt install libpng-dev libjpeg-dev libwebp-dev libtiff-dev -y"
@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 / apache7_extras_install.sh
Last active January 28, 2019 16:59
Apache7 Examples/Admin Install
#!/bin/bash
echo "***************** Apache7 Examples/Admin Install *****************"
echo "You may be prompted for root credentials to complete the install."
echo "******************************************************************"
__ScriptVersion="2015.02.24-Debian"
__ScriptName="apache7_extras_install.sh"
__ScriptFullName="$0"
@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 / pom.xml
Last active February 1, 2017 18:39
My Struts2 Development POM
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.stormgames.web</groupId>
<artifactId>web</artifactId>
<packaging>war</packaging>
<version>0.0.1</version>
<name>Struts2 Example</name>
<properties>
@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
mkdir -p MyWebApp && cd MyWebApp
virtualenv venv
source venv/bin/activate
pip install flask
pip freeze > requirements.txt
vim hello.py
************************************
import os
from flask import Flask