Skip to content

Instantly share code, notes, and snippets.

View xrd's full-sized avatar
🎯
Focusing

Chris Dawson xrd

🎯
Focusing
View GitHub Profile
@xrd
xrd / gist:6055536
Created July 22, 2013 16:56
Upgrade vagrant boxes directory to 1.2
#!/bin/bash
LOG_RESTORE_SCRIPT=vagrant-update.`date +%Y-%m-%d`-$$.log.sh
cd ~/.vagrant.d/boxes
echo "#/bin/bash" >> $LOG_RESTORE_SCRIPT
echo "cd ~/.vagrant.d/boxes" >> $LOG_RESTORE_SCRIPT
for x in `ls | grep -v '\.log\.sh'`; do
if [ ! -d "$x/virtualbox" ]; then
Information:Using javac 1.6.0_45 to compile java sources
Information:java: Errors occurred while compiling module 'android-oauth-client-samples'
Information:Compilation completed with 100 errors and 0 warnings in 2 sec
Information:100 errors
Information:0 warnings
/Users/xrdawson/Projects/TeddyHyde/oAuthToken/android-oauth-client/samples/src/main/java/com/wuman/oauth/samples/OAuth.java
Error:Error:line (4)java: /Users/xrdawson/Projects/TeddyHyde/oAuthToken/android-oauth-client/samples/src/main/java/com/wuman/oauth/samples/OAuth.java:4: package android.content does not exist
Error:Error:line (5)java: /Users/xrdawson/Projects/TeddyHyde/oAuthToken/android-oauth-client/samples/src/main/java/com/wuman/oauth/samples/OAuth.java:5: package android.os does not exist
Error:Error:line (7)java: /Users/xrdawson/Projects/TeddyHyde/oAuthToken/android-oauth-client/samples/src/main/java/com/wuman/oauth/samples/OAuth.java:7: package android.text does not exist
Error:Error:line (36)java: /Users/xrdawson/Projects
@xrd
xrd / gist:5059942
Created February 28, 2013 20:41
AppFog Contest
// This script reports its own src at /s[rc]
// This poem is beautiful and important to execution
//
// -Happy Birthday OpenStack, with a #createServer
// Content-type: writeHead and format.
// vmc_app_port -> toUpperCase.
// http or url ^ envious?
// text/plain for $, but how much?
bundle exec rake test TEST=test/unit/search_test.rb
/usr/local/rvm/gems/ruby-1.9.2-p290@foobar/gems/activesupport-3.2.8.rc2/lib/active_support/dependencies.rb:251:in `require': no such file to load -- timecop/timecop (LoadError)
from /usr/local/rvm/gems/ruby-1.9.2-p290@foobar/gems/activesupport-3.2.8.rc2/lib/active_support/dependencies.rb:251:in `block in require'
from /usr/local/rvm/gems/ruby-1.9.2-p290@foobar/gems/activesupport-3.2.8.rc2/lib/active_support/dependencies.rb:236:in `load_dependency'
from /usr/local/rvm/gems/ruby-1.9.2-p290@foobar/gems/activesupport-3.2.8.rc2/lib/active_support/dependencies.rb:251:in `require'
from /usr/local/rvm/gems/ruby-1.9.2-p290@foobar/gems/timecop-0.5.2/lib/timecop.rb:1:in `<top (required)>'
from /usr/local/rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.2.2/lib/bundler/runtime.rb:68:in `require'
from /usr/local/rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.2.2/lib/bundler/runtime.rb:68:in `block (2 levels) in require'
appmod = angular.module( "mymodule", [] )
appmod.config [ '$httpProvider', ($httpProvider) ->
authToken = $('meta[name="csrf-token"]').attr('content')
$httpProvider.defaults.headers.common[ 'X-CSRF-TOKEN' ] = authToken
$httpProvider.responseInterceptors.push ( $q ) ->
( promise ) ->
success = (response) ->
Web app to manage "fussy widgets"
* "Fussy Widgets"
* FW are owned by one or more users
* Have a quantity
Web app should:
* Allows someone to login
* Allows logged in users ability to edit quantity, but not name.
puts "hi there"
foo.each { |f| puts f.inspect }
// This script reports its own src at /s[rc]
// This poem is beautiful and important to execution
//
// -Happy Birthday OpenStack, with a #createServer
// Content-type: writeHead and format.
// vmc_app_port -> toUpperCase.
// http or url ^ envious?
// text/plain for $, but how much?
Table A
id name
-- ----
55 Bob
Table B
value a_id c_id
---- ---- ----
dpkg: dependency problems prevent configuration of emacs-snapshot-bin-common:
emacs-snapshot-bin-common depends on emacs-snapshot-common (= 2:20120522-1~ppa1~precise1); however:
Version of emacs-snapshot-common on system is 2:20120524-1~ppa1~precise1.
dpkg: error processing emacs-snapshot-bin-common (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of emacs-snapshot:
emacs-snapshot depends on emacs-snapshot-bin-common (= 2:20120522-1~ppa1~precise1); however:
Package emacs-snapshot-bin-common is not configured yet.
No apport report written because the error message indicates its a followup error from a previous failure.
dpkg: error processing emacs-snapshot (--configure):