These commands are good as of 2011-07-27.
App store http://itunes.apple.com/us/app/xcode/id448457090?mt=12) The download/install takes awhile so start it first. When it finishes downloading you will still need to run it to complete installation.
| package forma; | |
| import forma.WholeFileInputFormat; | |
| import cascading.scheme.Scheme; | |
| import cascading.tap.Tap; | |
| import cascading.tuple.Fields; | |
| import cascading.tuple.Tuple; | |
| import cascading.tuple.TupleEntry; | |
| import java.io.IOException; | |
| import org.apache.hadoop.mapred.JobConf; |
These commands are good as of 2011-07-27.
App store http://itunes.apple.com/us/app/xcode/id448457090?mt=12) The download/install takes awhile so start it first. When it finishes downloading you will still need to run it to complete installation.
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Chernoff Smileys</title> | |
| <script type="text/javascript" src="http://mbostock.github.com/d3/d3.js?2.5.0"></script> | |
| <script type="text/javascript" src="http://mbostock.github.com/d3/d3.layout.js?2.5.0"></script> | |
| <style type="text/css"> | |
| </style> | |
| </head> |
In a perfect world, where things are done well, not just quickly, I would expect to find the following when joining the company:
Documentation
Accurate / up-to-date systems architecture diagram
Accurate / up-to-date network diagram
Out-of-hours support plan
Incident management plan
| -- show running queries (pre 9.2) | |
| SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
| FROM pg_stat_activity | |
| WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
| ORDER BY query_start desc; | |
| -- show running queries (9.2) | |
| SELECT pid, age(clock_timestamp(), query_start), usename, query | |
| FROM pg_stat_activity | |
| WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
| #!/usr/bin/env python | |
| """An example of cursor dealing with prepared statements. | |
| A cursor can be used as a regular one, but has also a prepare() statement. If | |
| prepare() is called, execute() and executemany() can be used without query: in | |
| this case the parameters are passed to the prepared statement. The functions | |
| also execute the prepared statement if the query is the same prepared before. | |
| Prepared statements aren't automatically deallocated when the cursor is | |
| deleted, but are when the cursor is closed. For long-running sessions creating |
| #!/bin/sh | |
| echo "Flushing iptables rules..." | |
| sleep 1 | |
| iptables -F | |
| iptables -X | |
| iptables -t nat -F | |
| iptables -t nat -X | |
| iptables -t mangle -F | |
| iptables -t mangle -X | |
| iptables -P INPUT ACCEPT |
| #!/bin/bash | |
| if [[ "$#" < "2" || "$#" > "3" ]]; then | |
| cat <<END | |
| Glusterfs GFID resolver -- turns a GFID into a real file path | |
| Usage: $0 <brick-path> <gfid> [-q] | |
| <brick-path> : the path to your glusterfs brick (required) | |
| # Redirect STDOUT/STDERR into syslog | |
| exec > >(logger -p user.info) 2> >(logger -p user.warn) |
| <?php | |
| /* Very simple, crude, rate limiter */ | |
| /* | |
| Assumes _MEMCACHEDSITEPREFIX, _MEMCACHEDHOST and _MEMCACHEDPORT are `defined`: | |
| define('_MEMCACHEDHOST', '127.0.0.1'); | |
| define('_MEMCACHEDPORT', 11211); | |
| define('_MEMCACHEDSITEPREFIX', 'mysite'); | |
| */ |