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
@raws
raws / getTrueName.c
Created August 2, 2010 01:56
Bit of C to resolve the original path of an OS X alias
// getTrueName.c
//
// DESCRIPTION
// Resolve HFS and HFS+ aliased files (and soft links), and return the
// name of the "Original" or actual file. Directories have a "/"
// appended. The error number returned is 255 on error, 0 if the file
// was an alias, or 1 if the argument given was not an alias
//
// BUILD INSTRUCTIONS
// gcc-3.3 -o getTrueName -framework Carbon getTrueName.c
2:02 AM <raws> $ ssh raws@clints-imac
2:02 AM <raws> Clints-iMac raws$ osascript -e "set volume 10"
2:02 AM <raws> Clints-iMac raws$ say -v whisper 'Clint. I am watching you sleeeep'
...
8:30 AM <zap> raws did you make clint's Mac talk all night?
8:30 AM <clint> raws: lol you fuck face
8:30 AM <clint> god damn i thought i was insanew
8:30 AM <clint> i half--woke up when it talked
8:30 AM <clint> but not enough to know whether it was a dream or not
8:30 AM <clint> and then i had dreams telling people about how I thought I had a dream about hearing the mac voice talking to me
@raws
raws / LICENSE
Created December 18, 2011 07:12
Quick Ruby script to convert Minecraft schematics to BOB objects
Copyright (c) 2011 Ross Paffett
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
@raws
raws / gist:1495912
Created December 19, 2011 07:35
Shove Bukkit-friendly versions of ModloaderMp and Minecraft Forge into CraftBukkit
# Install ModloaderMp
cd modloadermp
jar uvMf path/to/craftbukkit.jar *
# Install Minecraft Forge
# Note that we do NOT use -M here, as we want to preserve ModloaderMp's MANIFEST.MF
cd minecraftforge
jar uvf path/to/craftbukkit.jar *
# Install BuildCraft
@raws
raws / hector.conf
Created January 4, 2012 03:36
Hector Upstart config
description "Hector IRC server"
env LC_CTYPE=en_US.UTF-8
env RBENV_VERSION=1.9.3-p0
env HECTOR_ROOT=/home/ross/hector/blolol.hect
script
/home/ross/.rbenv/bin/rbenv exec hector daemon
end script
@raws
raws / gist:1580909
Created January 9, 2012 03:41
Minecraft survival server block data

BuildCraft

143.0   Oil

RedPower

Flax

@raws
raws / gist:1861817
Created February 19, 2012 03:32
Spoutcraft development Rake tasks
# Spoutcraft development Rake tasks
# Usage: rake -T
#
# These tasks assume the following folder structure:
# spoutcraft/
# lib/
# spoutcraft-api.jar A compatible SpoutcraftAPI package
# mcp/ Minecraft Coder Pack
# conf/ Symlink to ../conf
# lib/ Symlink to ../lib
scope :module => "Api::V2" do
scope :path => "api/v2" do
resources :users
end
end
scope :module => "Api::V1" do
scope :path => "api/v1" do
resources :users
end
@raws
raws / create-git-repo.sh
Created July 15, 2012 06:17
Bash helper script for creating a Git repository on systems hosting them
#!/bin/bash
#
# create-git-repo
#
# Create and publish a Git repository so that it is able to be
# cloned via `git clone git@host:repo.git'.
#
# Author: Ross Paffett <ross@rosspaffett.com>
GIT_DATA="/var/git" # Where to store the actual git repositories
@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