This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # | |
| # This script surrounds the command passed in with start and finish notifications | |
| # to the Proby task monitoring application. | |
| # | |
| # | |
| # === SETUP | |
| # | |
| # * Make sure the proby script is executable. | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ### UPDATE: ruby-debuy19 is no longer maintained, use https://github.com/cldwalker/debugger | |
| # Install with: | |
| # bash < <(curl -L https://raw.github.com/gist/1333785) | |
| # | |
| # Reference: http://blog.wyeworks.com/2011/11/1/ruby-1-9-3-and-ruby-debug | |
| echo "Installing ruby-debug with ruby-1.9.3-p0 ..." | |
| curl -OL http://rubyforge.org/frs/download.php/75414/linecache19-0.5.13.gem |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # Script by @incanus to update Hubot from release tarballs since | |
| # repo tags are meant for development. | |
| if [ -z $1 ]; then | |
| echo "Usage: $0 <version>" | |
| exit 1 | |
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| log_level :info | |
| log_location STDOUT | |
| node_name 'solo' | |
| client_key File.expand_path('../solo.pem', __FILE__) | |
| cache_type 'BasicFile' | |
| cache_options( :path => File.expand_path('../checksums', __FILE__)) | |
| cookbook_path [ File.expand_path('../../cookbooks', __FILE__) ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;NSIS Modern User Interface | |
| ;Rsync Windows Service Script | |
| ;Written by Umberto Nicoletti http://unicolet.blogspot.com/ | |
| !define SCRIPT_VERSION "1.0" | |
| ;-------------------------------- | |
| ;Include Modern UI | |
| !include "MUI2.nsh" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # .chef/knife.rb | |
| # SEE: http://wiki.opscode.com/display/chef/Troubleshooting+and+Technical+FAQ | |
| # set some sensible defaults | |
| current_dir = File.dirname(__FILE__) | |
| user = ENV['OPSCODE_USER'] || ENV['USER'] | |
| log_level :debug | |
| log_location STDOUT | |
| node_name `hostname` | |
| client_key '' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ActiveAdmin::Dashboards.build do | |
| # Add this section in your dashboard... | |
| section "Background Jobs" do | |
| now = Time.now.getgm | |
| ul do | |
| li do | |
| jobs = Delayed::Job.where('failed_at is not null').count(:id) | |
| link_to "#{jobs} failing jobs", admin_jobs_path(q: {failed_at_is_not_null: true}), style: 'color: red' | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # | |
| # Improved version of http://docs.dotcloud.com/guides/backups/ | |
| # | |
| HOSTNAME=`hostname` | |
| TAG="${HOSTNAME}_$(TZ=UTC date +%Y-%m-%d_%H:%M:%S_UTC)" | |
| [ "$3" ] || { | |
| echo "Please specify what to backup, how, and where." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function __database_yml { | |
| if [[ -f config/database.yml ]]; then | |
| ruby -ryaml -rerb -e "puts YAML::load(ERB.new(IO.read('config/database.yml')).result)['${RAILS_ENV:-development}']['$1']" | |
| fi | |
| } | |
| function psql | |
| { | |
| if [[ "$(__database_yml adapter)" == 'postgresql' ]]; then | |
| PGDATABASE="$(__database_yml database)" "$(/usr/bin/which psql)" "$@" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # context: I need to be reasonably sure that not two instances of a ruby script | |
| # run at the same time, on Windows. What follows seems to work. | |
| # tested on ruby 1.9.3p125 (2012-02-16) [i386-mingw32] | |
| def log(msg) | |
| puts "#{$$} #{msg}" | |
| end | |
| def do_the_work_with_lock |