Skip to content

Instantly share code, notes, and snippets.

View jeremyolliver's full-sized avatar
☁️
Yak shaving a cloud somewhere

Jeremy Olliver jeremyolliver

☁️
Yak shaving a cloud somewhere
View GitHub Profile
@jeremyolliver
jeremyolliver / Git command ref
Created February 26, 2009 01:33
Git Command Reference
# Remote branch management
# 'checkout' locally a branch on the remote repo
git checkout -b <local name> origin/<remote name>
# Remove a branch both locally and remotely
git branch -d <branchname> # -d for when already merged to current branch. -D to force delete of un-merged branch anyway
git push origin :<branchname>
# commiting and pushing
@jeremyolliver
jeremyolliver / Git branch in command prompt
Created May 11, 2009 03:01
Git branch in command prompt
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
PS1="\w\$(parse_git_branch) $ "
@jeremyolliver
jeremyolliver / .gemrc
Created July 11, 2011 00:44
Nobody likes to wait for rdoc or ri to instal. Put this in your ~/.gemrc
---
gem: --no-ri --no-rdoc
#!/bin/bash -x
source ~/.bashrc
bundle install --without=development
bundle exec rake db:reset db:migrate RAILS_ENV=test
bundle exec rake spec RAILS_ENV=test
@jeremyolliver
jeremyolliver / attributes-default.rb
Created October 10, 2012 06:28
Fix rbenv chef recipe issues downloading .tar.gz files from ruby-lang.org
# attributes/default.rb
default[:ruby][:version] = '1.9.3-p194'
default[:ruby][:global_version] = false
@jeremyolliver
jeremyolliver / gist:3967467
Created October 28, 2012 04:09
Setup Chef Server on Ubuntu
# Setup the apt repository as a source
# codename should be appended by -0.10 (e.g. lucid-0.10, precise-0.10) this will automatically set the correct value
echo "deb http://apt.opscode.com/ `lsb_release -cs`-0.10 main" | sudo tee /etc/apt/sources.list.d/opscode.list
# Add the opscode keys
sudo mkdir -p /etc/apt/trusted.gpg.d
gpg --keyserver keys.gnupg.net --recv-keys 83EF826A
gpg --export packages@opscode.com | sudo tee /etc/apt/trusted.gpg.d/opscode-keyring.gpg > /dev/null

Team Fortress 2 is a team based first person shooter.

Introduction

There are 9 classes with unique attributes such as health, run speed, weapons, and other special abilities. Each class has 3 weapons, a Primary, a Secondary, and a Meele weapon (spy and engineer also have a fourth equip-able for a special ability).

General info: Switch weapons with scroll wheel or numbers 1-3. 'q' quickswitches between last weapon. You can walk through your friendly team members. There is no friendly fire, you cannot hurt team members with your weapons. Explosive weapons like rockets and the demoman's weapons can damage only the player shooting them if they explode too close. Explosive projectiles cannot shoot through a friendly sentry gun/buildings, though they will not damage the building.

@jeremyolliver
jeremyolliver / Gem Guide.md
Last active December 11, 2015 21:19
Authouring gems - Namespaces, Rails Engines, and Templates

Writing Gems

Creating the project

There are several recommended ways to create the empty gem project.

For rails engines: it's best to update to the latest version of rails and generate it via rails (See http://guides.rubyonrails.org/engines.html). For regular rubygems, I recommend using either:

def self.coerce_rlimit_resource(resource)
if resource.is_a?(Symbol) && (const_name = "RLIMIT_#{resource}") && const_defined?(const_name)
resource = const_get(const_name)
else
raise ArgumentError, "invalid resource name #{resource}"
end
Rubinius::Type.coerce_to resource, Integer, :to_int
end
@jeremyolliver
jeremyolliver / soloist.sh
Created March 19, 2013 00:44
Initial Soloist Laptop install
#!/bin/bash
# This shell script was created at solowizard.com
#
# Usage:
# Running the script remotely:
# bash < <(curl -s http://www.solowizard.com/soloist_scripts/mkrsau.sh )
# Running the script if you have downloaded it:
# ./mkrsau.sh
#
# http://github.com/tommyh/solo_wizard