If you get this error while running ab (ApacheBench) on your mac:
apr_poll: The timeout specified has expired (70007)It may get fixed with:
sudo sysctl -w net.inet.ip.portrange.first=32768sudo sysctl -w net.inet.tcp.msl=100My technical blog.
apr_poll: The timeout specified has expired (70007)sudo sysctl -w net.inet.ip.portrange.first=32768sudo sysctl -w net.inet.tcp.msl=100
require 'rubygems'
require 'gmail_sender'
g = GmailSender.new("gmail_account", "password")
begin
#Some interesting script that returns some interesting results in script_results
g.send("dcadenas@gmail.com", "It worked!", script_results.to_yaml)
rescue => e
g.send("dcadenas@gmail.com", "It didn't work :(", "#{e.message}\n#{e.backtrace}")
raise e
end
So all you need to pass to the send method is an email address, the subject and the email content.
Source code is here and you can install it with sudo gem install dcadenas-gmail_sender (remember to add github to your rubygems sources).
grepvim(){
grep -rl "$1" $2| xargs mvim -o +/"$1"
}
rakvim(){
rak -l "$1" $2| xargs mvim -o +/"$1"
}
ssh -v -nNT4 -R :4007:localhost:3000 linode
which maps the remote port 4007 to the local port 3000.linode is the host you want to connect to which should be properly configured in your ssh config.