Skip to content

Instantly share code, notes, and snippets.

View raws's full-sized avatar
🥯
dabbling in pumpernickel

Ross Paffett raws

🥯
dabbling in pumpernickel
View GitHub Profile
static {
    NoverPackage.undoPackageVersioning(MyPlugin.class);
}
@raws
raws / plugin.yml
Created December 9, 2012 20:57
Requesting access to bypass Spout's sandbox from your plugin
security:
# Keywords:
- network
- file-system
# Or explicit classes:
- org.spout.plugin.security.clearances.NetworkClearance
- org.spout.plugin.security.clearances.FileSystemClearance
@raws
raws / curl.md
Created December 9, 2012 15:38 — forked from btoone/curl.md
A curl tutorial using GitHub's API

Introduction

An introduction to curl using GitHub's API

The Basics

Makes a basic GET request to the specifed URI

curl https://api.github.com/users/caspyin
java.lang.IncompatibleClassChangeError
at codechicken.wirelessredstone.core.RedstoneEtherFrequency.putActiveTransmittersInList(RedstoneEtherFrequency.java:383)
at codechicken.wirelessredstone.core.RedstoneEther.getActiveTransmitters(RedstoneEther.java:1208)
at codechicken.wirelessredstone.addons.RedstoneEtherAddonManager.processSMPMaps(RedstoneEtherAddonManager.java:143)
at codechicken.wirelessredstone.addons.RedstoneEtherAddonManager.onTick(RedstoneEtherAddonManager.java:564)
at net.minecraft.server.mod_WirelessRedstoneAddons.onTickInGame(mod_WirelessRedstoneAddons.java:41)
at net.minecraft.server.BaseMod.doTickInGame(BaseMod.java:34)
at cpw.mods.fml.common.modloader.BaseModTicker.sendTick(BaseModTicker.java:95)
at cpw.mods.fml.common.modloader.BaseModTicker.tickBaseMod(BaseModTicker.java:83)
at cpw.mods.fml.common.modloader.BaseModTicker.tickEnd(BaseModTicker.java:55)
@raws
raws / email_matchers.rb
Created December 9, 2012 00:33
RSpec integration spec email matcher
RSpec::Matchers.define :send_an_email do
chain :subject do |subject|
@subject = subject
end
chain :to do |to|
@to = to
end
match do
@raws
raws / gist:4241773
Created December 8, 2012 20:26
Display Git branch in shell prompt
function parse_git_branch {
ref=$(git symbolic-ref HEAD 2> /dev/null) || return
echo "("${ref#refs/heads/}")"
}
if [[ `whoami` == "root" ]]; then
PS1="# "
else
PS1="\[\e[38;5;240m\]\$(date +%H:%M) \W \$(parse_git_branch)\$\[\e[0m\] "
fi
@raws
raws / 01-install.txt
Created November 23, 2012 03:34
Install Ruby 1.9.3-p327 on a Synology DS1511+ with DSM 4.1
#########################################
### Install wget-ssl over ipkg's wget ###
#########################################
$ ipkg install -verbose_wget libidn # To get ipk URL
$ ipkg install -verbose_wget wget-ssl # To get ipk URL
$ /usr/syno/bin/wget http://ipkg.nslu2-linux.org/feeds/optware/syno-i686/cross/unstable/libidn_1.25-1_i686.ipk
$ /usr/syno/bin/wget http://ipkg.nslu2-linux.org/feeds/optware/syno-i686/cross/unstable/wget-ssl_1.12-2_i686.ipk
$ ipkg install libidn_1.25-1_i686.ipk
$ ipkg install wget-ssl_1.12-2_i686.ipk
@raws
raws / gist:4073068
Created November 14, 2012 16:19
Crazy Thor extensions I wrote and didn't need because they're dumb and complex but I might want to look at them again later so I'm saving them here also what is a run-on sentence
require 'active_support/core_ext/module/aliasing'
require 'thor'
require 'thor/group'
class Thor
class << self
def method_options_from(option)
{
aliases: option.aliases,
banner: option.banner,
@raws
raws / detect_faces.rb
Created November 10, 2012 03:20
Detect faces using Ruby and OpenCV
#!/usr/bin/env ruby
require "opencv"
if ARGV.length < 2
puts "usage: detect_faces.rb path/to/input.jpg path/to/output.jpg"
exit 1
end
data = "/usr/local/share/OpenCV/haarcascades/haarcascade_frontalface_alt_tree.xml"
detector = OpenCV::CvHaarClassifierCascade.load(data)
@raws
raws / gist:4043319
Created November 9, 2012 02:20
How Minecraft works
public class Item {
public static final Item[] items = new Item[32000];
public Item(int id) {
items[id] = this;
}
}
public class Pickaxe extends Item {