Skip to content

Instantly share code, notes, and snippets.

@Darkhogg
Darkhogg / Slick2D-Scaffolding
Last active September 28, 2015 16:48
Scaffolding for a Slick2D game for Ludum Dare
Generic scaffolding for fast deploying of Slick2D games.
* Includes a `Main` class with a `main` method that serves as an entry point for applications.
* Includes a class within `Main`, `Main$WrapperGame`, which wraps the actual `Game` implementation for use with the Slick2D `AppletLoader` class, which also serves as a common starting point for the `main` method.
* Includes an automatic modification of the `java.library.path` system property which *adds* the path `lib/natives-*system*` to the path, where *system* is one of `linux`, `windows`, `mac` or `solaris`.
* Includes a basic class `MyGame` ready to be filled with the game implementation.
* Includes an HTML file with an applet ready to be used.
* Includes an Ant buildfile ready to be executed, which generates an executable JAR file, a ZIP containing that JAR and the `lib` folder, and a `README.txt` file, if present; and another ZIP file with the `src`, `res` and `lib` folders.
To start working with this, you will need to refactor the included classes.
@Darkhogg
Darkhogg / README.md
Last active August 29, 2015 14:22
HexChat script for Werebot

Werebot HexChat Helper

This simple Python script will make a few repetitive tasks easy when playing Werebot. What it does is:

  • Sends any Werebot commands directly to the bot, which prevents the disclosure of your role by accidentaly sending a command at the wrong time and makes it easier to use commands at night (i.e., when the channel is fully muted).
  • Automatically joins any of the official Werebot channels when the bot invites you, particularly useful for auto-joining the werewolf channel.

To install it, you will need both HexChat and Python 2.7 installed. Download and install them from https://hexchat.github.io/downloads.html. When installing HexChat, be sure to select and install the Python 2.7 plugin.

@Darkhogg
Darkhogg / factorio-update.sh
Created January 23, 2015 15:03
A small script to update the factorio-experimental AUR package automatically without any manual intervention
#!/bin/bash
function msg () {
local FMT="$1"
shift
printf "\x1B[1;35m==> \x1B[;1m${FMT}\x1B[m\n" "$@"
}
function msg2 () {
local FMT="$1"
@Darkhogg
Darkhogg / raspberry-wifi-disconnect-fix.PKGBUILD
Last active August 29, 2015 14:11
Small package to fix WiFi disconnection problems on the Raspberry Pi
# Maintainer: Daniel Escoz <darkhogg+aur at gmail dot com>
pkgname=raspberrypi-wifi-disconnect-fix
pkgver=20141222
pkgrel=1
arch=(any)
license=('custom:WTFPL')
package() {
install -Ddm755 "$pkgdir/etc/modprobe.d/"
echo 'options 8192cu rtw_power_mgnt=0 rtw_enusbss=1 rtw_ips_mode=1' >"$pkgdir/etc/modprobe.d/8192cu.conf"
@Darkhogg
Darkhogg / dhg.zsh-theme
Created March 21, 2014 19:37
A theme for oh-my-zsh
local _c_reset="$reset_color"
local _c_user="$fg_bold[green]"
local _c_host="$fg_bold[yellow]"
local _c_path="$fg_bold[blue]"
local _c_git_branch="$fg_bold[magenta]"
local _c_git_dirty="$fg_bold[cyan]"
local _c_prompt="$fg_bold[white]"
local ret_status="%(?::
%{$fg_bold[red]%}%?%s)"