Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
echo 'Checking Google:'
nslookup $1 8.8.8.8
echo 'Checking Level3:'
nslookup $1 209.244.0.3
echo 'Checking Verisign:'
nslookup $1 64.6.64.6
@asbestossupply
asbestossupply / demo_test.rb
Created February 9, 2015 16:41
Demo Capybara integration for Barge
require 'capybara/rails'
require 'barge'
class DemoTest < ActionDispatch::IntegrationTest
def setup
Capybara.default_driver = :selenium
Capybara.run_server = false
configure_for_barge if ENV['BARGE']
end
@asbestossupply
asbestossupply / logentriesBeanstalk.config
Last active August 29, 2015 13:57
Logentries ElasticBeanstalk Configuration
commands:
01edit-rsyslog-conf:
command: echo '$template LogentriesFormat,\"TOKEN %HOSTNAME% %syslogtag%%msg%\\n\"' >> /etc/rsyslog.conf
02add-second-line:
command: echo '*.* @@api.logentries.com:10000;LogentriesFormat' >> /etc/rsyslog.conf
03restart-syslog:
command: service rsyslog restart
# This is the default .slate file.
# If no ~/.slate file exists this is the file that will be used.
config defaultToCurrentScreen true
config nudgePercentOf screenSize
config resizePercentOf screenSize
# Resize Bindings
#bind right:alt resize +10% +0
#bind left:alt resize -10% +0
@asbestossupply
asbestossupply / coffeeline
Last active December 21, 2015 16:59
given the location of a coffeescript file this script will output the compiled js to the console with line numbers
#!/bin/bash
[ $# -eq 0 ] && { echo "Usage: $0 filename"; exit 999; }
# check for coffee
C=`which coffee`
[ -z $C ] && { echo "coffee not found"; exit -1; }
# check for awk
A=`which awk`
[ -z $A ] && { echo "awk not found"; exit -1; }