Skip to content

Instantly share code, notes, and snippets.

@carsonreinke
carsonreinke / wireless_strength
Created January 21, 2020 20:57
Wireless Strength
#!/bin/bash
watch -d -t -n 1 "awk 'NR==3 {printf(\"WiFi Signal Strength = %.0f%%\\n\",\$3*10/7)}' /proc/net/wireless"
@carsonreinke
carsonreinke / gist:0d89864cfb5c330dd3ee
Created August 20, 2014 20:56
Rails Issue #16588
unless File.exist?('Gemfile')
File.write('Gemfile', <<-GEMFILE)
source 'https://rubygems.org'
gem 'rails', github: 'rails/rails'
gem 'arel', github: 'rails/arel'
gem 'rack', github: 'rack/rack'
gem 'i18n', github: 'svenfuchs/i18n'
gem 'sqlite3'
GEMFILE
@carsonreinke
carsonreinke / gist:3901279
Created October 16, 2012 19:05
Export SVN Modifications
tar czf ~/export.tgz `svn status | grep -Po '(?<=[AM\?](\s{7})|(\s{2}\+\s{4})).*'`
@carsonreinke
carsonreinke / resque-pause-workers.sh
Created May 18, 2012 15:01
Pause Resque Workers
pkill -12 -f '^resque-[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+: (Forked)|(Waiting for)'
pkill -18 -f '^resque-[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+: (Forked)|(Paused)'