Installs ruby-2.0.0-p247 on ubuntu via checkinstall so it's in your package manager and you can remove it.
Quick install:
curl -Lo- https://gist.github.com/parasquid/5624732/raw/install-ruby-2-ubuntu.sh | bash
# config/environments/development.rb | |
Hello::Application.configure do | |
# ... | |
# https://rails.lighthouseapp.com/projects/8994/tickets/4676-reload-routes-on-each-request-in-dev-mode | |
service_reloader = ActiveSupport::FileUpdateChecker.new(Dir["app/services/**"]) { Rails.application.reload_routes! } | |
config.to_prepare do | |
service_reloader.execute_if_updated |
# Seek&Destroy: Sample Bot | |
# | |
# Enjoys following and target and firing many shots | |
class SeekAndDestroy < RTanque::Bot::Brain | |
NAME = 'Jimmy' | |
include RTanque::Bot::BrainHelper | |
TURRET_FIRE_RANGE = RTanque::Heading::ONE_DEGREE * 5.0 | |
def tick! |
set :max_asset_age, 2 ## Set asset age in minutes to test modified date against. | |
after "deploy:finalize_update", "deploy:assets:determine_modified_assets", "deploy:assets:conditionally_precompile" | |
namespace :deploy do | |
namespace :assets do | |
desc "Figure out modified assets." | |
task :determine_modified_assets, :roles => assets_role, :except => { :no_release => true } do | |
set :updated_assets, capture("find #{latest_release}/app/assets -type d -name .git -prune -o -mmin -#{max_asset_age} -type f -print", :except => { :no_release => true }).split |
Installs ruby-2.0.0-p247 on ubuntu via checkinstall so it's in your package manager and you can remove it.
Quick install:
curl -Lo- https://gist.github.com/parasquid/5624732/raw/install-ruby-2-ubuntu.sh | bash
# security measures: | |
# - change ssh port to 20022 | |
sed -i 's/#Port 22/Port 20022/' /etc/ssh/sshd_config | |
# - disallow root login | |
sed -i 's/PermitRootLogin yes/PermitRootLogin no/' /etc/ssh/sshd_config | |
# - disallow password auth | |
cat >> /etc/ssh/sshd_config << EOF | |
PasswordAuthentication no | |
AllowUsers deploy | |
EOF |
tristan@tristan-vbox ~/Sites/lightbringer $ cap production deploy | |
INFO [8ec98abf] Running /usr/bin/env git checkout master on | |
DEBUG [8ec98abf] Command: ( RAILS_ENV=production /usr/bin/env git checkout master ) | |
DEBUG [8ec98abf] Already on 'master' | |
INFO [8ec98abf] Finished in 0.168 seconds with exit status 0 (successful). | |
INFO [61300fdb] Running /usr/bin/env git pull origin master on | |
DEBUG [61300fdb] Command: ( RAILS_ENV=production /usr/bin/env git pull origin master ) | |
DEBUG [61300fdb] Already up-to-date. | |
DEBUG [61300fdb] From github.com:mindvalley/lightbringer | |
DEBUG [61300fdb] * branch master -> FETCH_HEAD |
sed -i 's/local all postgres peer/local all all peer/' /etc/postgresql/9.3/main/pg_hba.conf | |
sed -i 's/host all all 127.0.0.1\/32 md5/host all all 127.0.0.1\/32 trust/' /etc/postgresql/9.3/main/pg_hba.conf | |
/etc/init.d/postgresql restart |
{ | |
"caret_extra_bottom": 1, | |
"caret_extra_top": 1, | |
"caret_extra_width": 2, | |
"color_scheme": "Packages/Color Scheme - Default/Dawn.tmTheme", | |
"copy_with_empty_selection": false, | |
"default_line_ending": "unix", | |
"drag_text": false, | |
"font_face": "Consolas", | |
"font_size": 12, |
. /Applications/Xcode.app/Contents/Developer/usr/share/git-core/git-completion.bash | |
source /Applications/Xcode.app/Contents/Developer/usr/share/git-core/git-prompt.sh | |
export PATH="$PATH:$HOME/bin" | |
[ -f /home/linuxbrew/.linuxbrew/etc/bash_completion ] && . /home/linuxbrew/.linuxbrew/etc/bash_completion | |
source /home/linuxbrew/.linuxbrew/etc/bash_completion.d/git-prompt.sh | |
PS1="\[\033[32m\][\[\033[1;32m\]\w]\[\033[0m\]\$(__git_ps1) \n\[\033[1;36m\]\u\[\033[32m\]$ \[\033[0m\]" |
# locks exposure | |
t ia2 -exp lock 1 | |
# enable USB Mass Storage Device | |
sleep 1 | |
t app usb msc | |
# records video | |
sleep 4 | |
t app button shutter PR |