Skip to content

Instantly share code, notes, and snippets.

View shanesveller's full-sized avatar
💭
I may be slow to respond.

Shane Sveller shanesveller

💭
I may be slow to respond.
View GitHub Profile
require 'formula'
class Serf < Formula
homepage 'http://www.serfdom.io'
version '0.5.0'
depends_on :arch => :intel
if Hardware.is_64_bit?
url 'https://dl.bintray.com/mitchellh/serf/0.5.0_darwin_amd64.zip'
@shanesveller
shanesveller / keybase.md
Created April 14, 2014 17:58
Keybase verification

Keybase proof

I hereby claim:

  • I am shanesveller on github.
  • I am shanesveller (https://keybase.io/shanesveller) on keybase.
  • I have a public key whose fingerprint is 13C3 4F6E BC0B 3DC9 014E CD93 50F5 1F9A EC10 6145

To claim this, I am signing this object:

@shanesveller
shanesveller / gist:3245f275d47d416d7d64
Created June 17, 2014 19:09
Last.fm - Similar artists via httpie / jq
$ LFM_ROOT=http://ws.audioscrobbler.com/2.0/
$ ARTIST="Rise Against"
$ AGENT=ShaneSveller
$ API_KEY=CHANGEME
$ http GET $LFM_ROOT method==artist.getsimilar artist=="$ARTIST" api_key==$API_KEY format==json User-Agent:$AGENT | jq '.similarartists.artist[].name'
@shanesveller
shanesveller / LICENSE.txt
Created July 4, 2014 18:12
Ventrilo 3 LICENSE
Ventrilo Public Server Software License, Version 3.0.0
THIS SOFTWARE LICENSE AGREEMENT (the "Agreement') is a legal agreement
between you (either an individual or single entity) and Flagship Industries, Inc.
("Flagship") for the software identified above. By installing, copying, downloading,
accessing or otherwise using the software or its documentation, you agree to be bound
by the terms of this Agreement. If you do not agree to the terms of this Agreement, do
not install or use the software or its documentation.
COPYING OF THIS COMPUTER PROGRAM OR ITS DOCUMENTATION EXCEPT
@shanesveller
shanesveller / shipyard.md
Created July 17, 2014 16:48
Shipyard on OSX - 2014-07-17

Within OSX

brew cask install boot2docker
boot2docker init
boot2docker up
boot2docker ssh

Within Boot2docker

@shanesveller
shanesveller / gist:291b4c4bef3d931fc13a
Created September 8, 2014 18:01
Logstash docker test
input {
syslog {
}
}
output {
stdout {
codec => json
}
}
@shanesveller
shanesveller / textmate-bundles-update.sake.rb
Created November 21, 2008 19:18
Sake task to update local version-controlled Textmate bundles
desc 'Update all svn- and git-based bundles in TextMate'
task 'textmate:bundles:update' do
BUNDLES = (Dir[(ENV["HOME"] + "/Library/Application Support/TextMate/Bundles/*")] + Dir[(ENV["HOME"] + "/Library/Application Support/TextMate/Pristine Copy/Bundles/*")])
for subdir in BUNDLES do
if File.exist?((subdir + "/.git/config")) then
sh("cd #{subdir.gsub(" ", "\\ ")} && git pull")
elsif File.exist?((subdir + "/.svn/entries")) then
sh("cd #{subdir.gsub(" ", "\\ ")} && svn up")
end
end
@shanesveller
shanesveller / ssh-keys.sake.rb
Created November 21, 2008 19:30
Sake task to copy your DSA SSH pubkey to a remote host's authorized_keys
desc 'Copy ssh-key to authorized_keys on $HOST for $USER'
task 'ssh:keys' do
host = (ENV["HOST"]
user = (ENV["USER"]
if (host and user) then
sh("ssh #{user}@#{host} 'mkdir -p .ssh/'")
sh("cat .ssh/id_dsa.pub | ssh #{user}@#{host} 'cat >> .ssh/authorized_keys'")
end
end
@shanesveller
shanesveller / remote-git-repo.sake.rb
Created November 21, 2008 19:36
Sake task to remotely create a bare git repo
desc 'Create a new git repository at $GITUSER@$HOST:$REPO/'
task 'git:repo:new' do
user = (ENV["GITUSER"] or "git")
host = ENV["HOST"]
repo = ENV["REPO"]
system("ssh root@#{host} 'cd /home/git/ && mkdir -p #{repo} && cd #{repo} && git --bare init && chown -R git:git /home/git/#{repo}'")
end
# Must have root access, repo owner defaults to 'git'
# Using root user is to account for my preference to use git-shell as the shell on my 'git' user accounts
@shanesveller
shanesveller / item.rb
Created December 2, 2008 19:07
Delete all Items not referred to by at least one Toon
class Item
include DataMapper::Resource
property :id, Integer, :key => true
property :name, String
property :icon_base, String
property :item_type, String
for prop in [:max_dura,:slot,:quality]