Skip to content

Instantly share code, notes, and snippets.

View briandoll's full-sized avatar
😎
Helping companies market and sell more software

Brian Doll briandoll

😎
Helping companies market and sell more software
View GitHub Profile

Information is power. But like all power, there are those who want to keep it for themselves. The world’s entire scientific and cultural heritage, published over centuries in books and journals, is increasingly being digitized and locked up by a handful of private corporations. Want to read the papers featuring the most famous results of the sciences? You’ll need to send enormous amounts to publishers like Reed Elsevier.

There are those struggling to change this. The Open Access Movement has fought valiantly to ensure that scientists do not sign their copyrights away but instead ensure their work is published on the Internet, under terms that allow anyone to access it. But even under the best scenarios, their work will only apply to things published in the future. Everything up until now will have been lost.

That is too high a price to pay. Forcing academics to pay money to read the work of their colleagues? Scanning entire libraries but only allowing the folks at Google to read them? Providing scientific a

@briandoll
briandoll / performance.markdown
Created September 21, 2011 17:06 — forked from jcasimir/performance.markdown
Measuring Performance

Measuring Performance

Performance is often ignored in Rails development until it becomes a problem. If ignored too long, though, it can get very tricky to improve. It's valuable to regularly audit performance and look for hotspots or design choices that are slowing things down.

Inspecting the Logs

Inspecting the log will help identify the source of several performance issues the application may have.

The Rails application log outputs the time spent processing each request. It breakdowns the time spent at the database level as well processing the view code. In development mode, the logs are displayed on STDOUT where the server is being run. In a production setting the logs will be in log/production.log within the application's root directory.

#bash function to retrieve the last 5 tweets from a user
#based on the Chirp hackathon project by @jf and @jazzychad
#hattip @gypak
last5tweets ()
{
dig +short TXT `dig +short TXT $1.timeline.twitter.viadns.org | tr -d \"` | tr -d \"
}
#usage:
(defun mate-open-buffer ()
"Open current file in TextMate"
(interactive)
(shell-command-to-string (concat "mate " buffer-file-name)))
#!/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