Skip to content

Instantly share code, notes, and snippets.

View BlakeLucchesi's full-sized avatar

Blake Lucchesi BlakeLucchesi

  • Seattle
View GitHub Profile
@BlakeLucchesi
BlakeLucchesi / chronos.json
Last active August 29, 2015 14:20
Chronos/Marathon Job
{
"schedule": "R\/2014-09-25T17:22:00Z\/PT2M",
"name": "dockerjob",
"container": {
"type": "DOCKER",
"image": "libmesos/ubuntu",
},
"cpus": "0.5",
"mem": "512",
"command": "while sleep 10; do date =u %T; done"
@BlakeLucchesi
BlakeLucchesi / device_id.rb
Created May 11, 2014 19:52
Connected iDevice UDID
def connected_device_id
output = `system_profiler SPUSBDataType`
device_id = output.match(/Serial Number: ([\w\d]{40})/)
if device_id.nil?
puts "Sorry could not find any connected devices to perform build with.\n"
raise Exception.new('Could not find a local iOS device to compile the build against.')
else
puts "Found a connected iDevice with identifier: #{device_id[1]}\n"
device_id[1]
@BlakeLucchesi
BlakeLucchesi / vagrant-repackage.log
Created April 2, 2014 04:30
Vagrant Repackage: Trying to catch undefined exception class
administrator@~/sh-dev-env$ VAGRANT_LOG=DEBUG vagrant box repackage sendhub-dev virtualbox
INFO global: Vagrant version: 1.5.1
INFO global: Ruby version: 2.0.0
INFO global: RubyGems version: 2.0.14
INFO global: VAGRANT_EXECUTABLE="/Applications/Vagrant/bin/../embedded/gems/gems/vagrant-1.5.1/bin/vagrant"
INFO global: VAGRANT_LOG="DEBUG"
INFO global: VAGRANT_INSTALLER_EMBEDDED_DIR="/Applications/Vagrant/bin/../embedded"
INFO global: VAGRANT_INSTALLER_VERSION="2"
INFO global: VAGRANT_DETECTED_OS="Darwin"
INFO global: VAGRANT_INSTALLER_ENV="1"
@BlakeLucchesi
BlakeLucchesi / deploy.rb
Created November 7, 2012 08:29
create a tag.txt file that contains details about the last commit which was deployed to a particular environment.
after "deploy:update_code", "deploy:create_tagfile"
desc "Create a tagfile with the latest tag and commit that was deployed."
task :create_tagfile, :roles => :app do
tagfile = "#{current_release}/public/tag.txt"
run "touch #{tagfile}"
run "cd #{current_release}; echo `git describe --tags` >> #{tagfile};"
run "cd #{current_release}; git log -n 1 >> #{tagfile};"
end