Skip to content

Instantly share code, notes, and snippets.

View cpb's full-sized avatar
🏠
Working from home

Caleb Buxton cpb

🏠
Working from home
View GitHub Profile
@cpb
cpb / plus1.bash
Last active December 11, 2015 02:49
Unfortunately, this is the bulk of my work these days
#!/bin/bash
read -p "Branch? " branch
echo
git co $branch
git pull origin $branch
git rebase az/master
read -p "Clean rebase? " -n 1 rebase
echo
@cpb
cpb / .zshrc
Created March 13, 2013 20:52
Good to add to your raspberry pi's shell rc
# TMUX
if which tmux 2>&1 >/dev/null; then
# if no session is started, start a new session
test -z ${TMUX} && (tmux attach || tmux new-session)
# when quitting tmux, try to attach
while test -z ${TMUX}; do
tmux attach || break
done
fi
@cpb
cpb / tweet.json
Last active December 17, 2015 21:30
Brief example of illustrating how a tweet might be represented in application/hal+json
{
"_links": {
"self": {
"href": "https://twitter.com/calebbuxton/status/328995716200558592" },
"reply": {
"href": "https://twitter.com/i/tweet/create?in_reply_to_status_id=328995716200558592" },
"favourite": {
"href": "https://twitter.com/i/tweet/favorite?id=328995716200558592" }
},
@cpb
cpb / repo.sh
Last active December 20, 2015 20:08 — forked from paulspencerwilliams/repo.sh
#/usr/bin/env ruby
rails new BugReproduce -T
cd BugReproduce
echo "group :test do" >> Gemfile
echo " gem 'cucumber-rails'" >> Gemfile
echo " gem 'rspec-rails'" >> Gemfile
echo " gem 'database_cleaner'" >> Gemfile
echo "end" >> Gemfile
echo "group :development do" >> Gemfile
@cpb
cpb / gist:6227768
Created August 14, 2013 03:29
cucumber-rails failures
Failing Scenarios:
cucumber features/capybara_javascript_drivers.feature:22 # Scenario: Use a particular driver
cucumber features/capybara_javascript_drivers.feature:44 # Scenario: Mixed DB access
cucumber features/choose_javascript_database_strategy.feature:30 # Scenario: Set the strategy to truncation and run a javascript scenario.
cucumber features/emulate_javascript.feature:3 # Scenario: See a widget
cucumber features/mongoid.feature:6 # Scenario: Keep Mongoid happy
cucumber features/multiple_databases.feature:62 # Scenario: Default transactional strategy is not attempted on second database
cucumber features/multiple_databases.feature:71 # Scenario: Truncation strategy is used on the second database
@cpb
cpb / gist:6640924
Created September 20, 2013 17:26
successful results
[default] Mounting shared folders...
[default] -- /vagrant
[default] -- /app_path
@cpb
cpb / Bash log
Last active December 23, 2015 18:29
I am having problems provisioning to aws.
$ vagrant box add ubuntu http://cloud-images.ubuntu.com/vagrant/precise/current/precise-server-cloudimg-amd64-vagrant-disk1.box
Downloading or copying the box...
Extracting box...te: 2942k/s, Estimated time remaining: 0:00:01)
The box you're attempting to add already exists:
Name: ubuntu
Provider: virtualbox
$ vagrant box list
ubuntu (virtualbox)
$ vagrant up --provider=virtualbox 1 ↵
Bringing machine 'default' up with 'virtualbox' provider...
[default] Clearing any previously set forwarded ports...
[default] Creating shared folders metadata...
[default] Clearing any previously set network interfaces...
[default] Preparing network interfaces based on configuration...
[default] Forwarding ports...
[default] -- 22 => 2222 (adapter 1)
[default] -- 80 => 3001 (adapter 1)
[default] Booting VM...
@cpb
cpb / gist:7327769
Created November 5, 2013 22:50
docker repo's vagrant up message
Examining /etc/kernel/header_postinst.d.
run-parts: executing /etc/kernel/header_postinst.d/dkms
3.8.0-32-generic
/boot/vmlinuz-3.8.0-32-generic
Error!
Bad return status for module build on kernel: 3.8.0-32-generic (x86_64)
Consult /var/lib/dkms/virtualbox-guest/4.1.12/build/make.log for more information.
@cpb
cpb / gist:7507777
Last active December 28, 2015 13:29
{"stimuli":
[
{"id":10,
"filepicker_url":"https://www.filepicker.io/api/file/lA7or5NjRC6fO8cIqoU5",
"created_at":"2013-11-16T23:27:17.907Z",
"suggestions":
[
{"id":9,"up":1,"down":-1}
]
},