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
| netstat -nputw |
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
| solr = RSolr.connect :url => solr_server #http://solr:8983/solr/some-index | |
| response = solr.get 'select', :params => { | |
| :q => '*:*', | |
| :rows => 0 | |
| } |
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
| Rails.application.routes.routes.each do |route| | |
| puts route.path.spec.to_s | |
| end;nil | |
| # specs with stubbed routes: https://github.com/blakechambers/matterhorn/blob/master/spec/support/url_test_helpers.rb | |
| routes.routes.each do |route| | |
| puts route.path.spec.to_s | |
| end;nil | |
| Rails.application.routes.named_routes.helpers |
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
| # https://github.com/bugsnag/bugsnag-api-ruby | |
| require 'bugsnag/api' | |
| Bugsnag::Api.configure do |config| | |
| config.auth_token = "your-account-api-token" | |
| end | |
| errors = Bugsnag::Api.errors(web_project_id) | |
| error = Bugsnag::Api.error(error_id) | |
| events = Bugsnag::Api.error_events error_id |
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
| #pry -r ./rate_limit_test.rb | |
| require './using_rate_limits' | |
| require './rate_limitable' | |
| f = UsingRateLimits.new | |
| require'pry';binding.pry | |
| f.some_method | |
| #using_rate_limits.rb | |
| require './rate_limitable' | |
| class UsingRateLimits |
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
| # setup metasploit from master on github: https://github.com/rapid7/metasploit-framework/wiki/Setting-Up-a-Metasploit-Development-Environment | |
| # good help on console and metasploit: http://www.offensive-security.com/metasploit-unleashed/Msfconsole | |
| #start msfconsole | |
| use auxiliary/scanner/http/apache_mod_cgi_bash_env | |
| set VHOST app.local | |
| set TARGETURI "/all" | |
| set RPORT 3000 |
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
| git push -f staging v1.3^{}:master |
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
| require 'tinder' | |
| pid = 2461 | |
| message = "DB restore complete!" | |
| campfire = Tinder::Campfire.new 'subdomain', :token =>'zxzxc' | |
| room = campfire.find_room_by_name 'roomname' | |
| puts "watching and waiting for pid #{pid} to complete" | |
| while `ps --no-headers #{pid}`.size > 0 | |
| puts "pid lives, waiting" | |
| sleep 10 |
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
| for FILE in `find . -type f -name *.rb`; do | |
| sed -i '' 's/old-method/new_method/g' $FILE | |
| done |
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
| pg_restore -d app_dev -O -U hankbeaver --role=hankbeaver ~/Downloads/app.2013-11-14T01-20-03.dump |