#Mac OS X
#!/bin/bash | |
# domainavailable | |
# Fast, domain name checker to use from the shell | |
# Use globs for real fun: | |
# domainavailable blah{1..3}.{com,net,org,co.uk} | |
# Inspired by foca / giles: | |
# http://gilesbowkett.blogspot.com/2009/02/simple-bash-domain-availability.html | |
trap 'exit 1' INT TERM EXIT |
Place the code in loop.sh into your .bash_profile or similar. Or include it with `source`. | |
Then to use: | |
loop [your commands here] | |
For example: | |
loop ls -l |
Readers,
Everyone makes mistakes and the best that can come out of one is a sinvecere apology and a determination to learn a lesson and improve for the future.
In last week's Ruby Weekly, we mistakenly included some material that unkindly referenced Reddit's ex-CEO Ellen Pao (it rhetorically asked if your app deployments were as 'horrible'). Pao has suffered a lot of negative press and abuse online recently and this reference was irrelevant, unnecessary and in poor taste. Contributing to a negative bandwagon does not fit with what readers expect of our newsletter.
I personally apologize to our readers and Ellen Pao for not meeting our usual standards. I also want to thank the readers who reached out to me about this matter for keeping us in check.
While the material was sponsor supplied and not written by us, we are responsible to our readers for their experience. Nonetheless, the advertiser has made their own statement here. I lacked the full context for
# SUPER DARING APP TEMPLATE 1.0 | |
# By Peter Cooper | |
# Link to local copy of edge rails | |
inside('vendor') { run 'ln -s ~/dev/rails/rails rails' } | |
# Delete unnecessary files | |
run "rm README" | |
run "rm public/index.html" | |
run "rm public/favicon.ico" |
# NAME: initializer | |
# VERSION: 1.0 | |
# AUTHOR: Peter Cooper [ http://www.rubyinside.com/ github:peterc twitter:peterc ] | |
# DESCRIPTION: Sinatra library to perform initialization functions - oriented around DataMapper use | |
# COMPATIBILITY: All, in theory - tested on Hoboken | |
# LICENSE: Use for what you want | |
# | |
# INSTRUCTIONS: | |
# 1. Ensure _this_ file is lib/initializer.rb within your app's directory structure | |
# 2. Read through and customize this file to your taste and your app's requirements |
# NAME: recaptcha | |
# VERSION: 1.0 | |
# AUTHOR: Peter Cooper [ http://www.rubyinside.com/ github:peterc twitter:peterc ] | |
# DESCRIPTION: Sinatra plugin to provide CAPTCHA support through recaptcha.net | |
# COMPATIBILITY: 0.3.2 /and/ latest rtomayko Hoboken builds! | |
# LICENSE: Use for what you want, just don't claim full credit unless you make significant changes | |
# | |
# INSTRUCTIONS: | |
# 0. Check out an extended client code example at the footer of this file | |
# 1. Ensure _this_ file is lib/recaptcha.rb within your app's directory structure |
# NAME: configurator | |
# VERSION: 1.0 | |
# AUTHOR: Peter Cooper [ http://www.rubyinside.com/ github:peterc twitter:peterc ] | |
# DESCRIPTION: Sinatra library to load app-wide configurations | |
# COMPATIBILITY: All, in theory - tested on Hoboken | |
# LICENSE: Use for what you want | |
# | |
# INSTRUCTIONS: | |
# 1. Ensure _this_ file is lib/initializer.rb within your app's directory structure | |
# 2. Add require 'lib/configurator' to your Sinatra app |
# Script to generate a CSV of all your Twitter followers screen_name, name, url, and description (bio) | |
# Runs fine on OS X: put into a file, and then from a Terminal: ruby whatever.rb to run. | |
require 'json' | |
puts "Enter your Twitter username:" | |
username = gets.chomp | |
puts "Enter your Twitter password:" | |
password = gets.chomp | |