Quick way to tell if a bot or something is hitting your site too many times

Run this on your access.log file:

tail -n 10000 access.log|cut -f 1 -d ’ ‘|sort|uniq -c|sort -nr|more

It will show you the number of times an IP Address appears. If one particular IP appears way too many then add this to your iptables:


Or run this to see if any IPs are currently hitting your server a lot:

netstat -ntu | awk ‘{print $5}’ | cut -d: -f1 | sort | uniq -c | sort -n

I asked my friends what advice they would give 20-somethings

Here is what they said:

  • Avoid debt at all costs
  • Learn about your finances as early as possible
  • Start saving and investing early
  • Try to live cheaply
  • Stop trying to impress people all the time
  • Have a five year plan
  • If you’re going to coast through something, try to get something lasting out of it.
  • Don’t take advice from someone in their 30s.
In-depth Cost Analysis of Buying Lunch at the Korean Deli Everyday Instead of Bringing Lunch

Buying Lunch Costs

Turkey sandwich at deli - $6
Inevitable impulse snack buy at the counter because you never get out of the office until you’re starving - $3
Internalized guilt trip from mom for buying lunch every day - $9
Discomfort caused by unorganized line at the deli counter where the guy yells “next!” and everybody looks around apprehensively trying to figure out who was next while the assertive person who was definitely not next places their order - $4

Bringing Lunch For The Week Costs

2 lbs. Turkey - $11.98
1 loaf of bread - $2.99
2 tomatoes - $1.45
1 head lettuce - $1.99
20 minutes/day @ $50/hr - $83.33
Guilt of throwing out groceries when x of y are starving in z - $1.60
Rotting hands from doing dishes - $2.10

Gumroad blog: Onepager Partners with Gumroad to Help Businesses Easily Set Up eCommerce Websites


This is a guest post by Yin Yin Chan, Co-Founder of Onepager. Onepager is a New York-based company dedicated to helping small businesses build great-looking websites and stay connected with their customers.

At Onepager we are all about simplicity, from our easy website builder to the

How I installed MySQL, RVM, Ruby, and Rails on Mountain Lion OS X 10.8

Install the command line tools for Xcode here. You don’t have to install Xcode if you don’t need it. It doesn’t even come with the command line tools automatically anymore anyway.

Install the 64-bit version of MySQL for OS X.

Add the following lines to your ~/.bash_login file:

export PATH=”/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH”
export DYLD_LIBRARY_PATH=”/usr/local/mysql/lib:$DYLD_LIBRARY_PATH”

Now you should be able to install RVM using their install instructions and then rvm install 1.9.3.

If you need to install 1.8.7, you have to install XQuartz first and run:

export CPPFLAGS=-I/opt/X11/include
rvm install 1.8.7 —with-gcc=clang

Check this out if you need to install ImageMagick and RMagick. 

(Source: lilfury)


If I ever put out a rap album, this is the cover.


If I ever put out a rap album, this is the cover.

(Source: itsandynotandrew)

If you double your price, then offer a 50% discount, is that dishonest pricing or just exploiting human psychology?

Gilt offers 10 Omaha Steaks 6oz. Filet Mignons at 40% off $165 for $99.

Omaha Steaks offers 10 Omaha Steaks 6oz. Filet Mignons at 33% off $165 for $109.00

Not much of a sale, Gilt.

Rails path vs url helpers

Manually re-blogged from http://ianlotinsky.wordpress.com/2010/09/24/rails-path-and-url-helpers/

Sometimes I forget the simple differences between Rail’s helpers. This mini post is so I don’t forget.

Generates relative URLs: /users
Used in views by link_to, form_for, etc. (per DHH)
The browser maps relative URLs to absolute URLs based on the current page’s protocol and host (/users on the page http://domain.com/new translates to http://domain.com/users)

Generates absolute URLs: http://domain.com/users
Used in controllers by redirect_to (per DHH) because RFC 2616 states that redirects must be absolute URLS. This is true, however, modern browsers can handle relative URL redirects now too

Remember when the entire MTA shut down for Hurricane Irene?

Remember when the entire MTA shut down for Hurricane Irene?

1 2 3 4 5