Skip to content

Instantly share code, notes, and snippets.

@aaronfeng
aaronfeng / gist:2007838
Created March 9, 2012 18:14
hbase scan root
hbase(main):003:0> scan '-ROOT-'
ROW COLUMN+CELL
.META.,,1 column=info:server, timestamp=1331294048767, value=localhost:43419
.META.,,1 column=info:serverstartcode, timestamp=1331294048767, value=1331294040049
1 row(s) in 0.0120 seconds
@aaronfeng
aaronfeng / gist:2252163
Created March 30, 2012 15:07
centos 6.2 AMI pv-grub
Xen Minimal OS!
start_info: 0xce2000(VA)
nr_pages: 0x6a400
shared_inf: 0xb85b9000(MA)
pt_base: 0xce5000(VA)
nr_pt_frames: 0xb
mfn_list: 0x990000(VA)
mod_start: 0x0(VA)
mod_len: 0
flags: 0x0
> ec2-describe-instances i-b06671d4
RESERVATION r-0de6606e 444992366026 jenkins
INSTANCE i-b06671d4 ami-df25fbb6 ec2-107-22-153-110.compute-1.amazonaws.com domU-12-31-38-01-BA-E3.compute-1.internal running riot-laptop 0 m1.small 2012-03-30T15:00:30+0000 us-east-1a aki-88aa75e1 monitoring-disabled 107.22.153.110 10.253.189.13 instance-store paravirtual xen sg-7c440e15 default
TAG instance i-b06671d4 Name
@aaronfeng
aaronfeng / gist:2314705
Created April 5, 2012 22:32
first cloud foundry app
Would you like to deploy from the current directory? [Yn]: Y
Application Name: testapp
Detected a Rails Application, is this correct? [Yn]: Y
Memory Reservation (64M, 128M, 256M, 512M, 1G, 2G) [256M]: 64M
Creating Application: OK
Would you like to bind any services to 'testapp'? [yN]: y
The following system services are available
1: mysql
Please select one you wish to provision: 1
Specify the name of the service [mysql-4f8ad]:
@aaronfeng
aaronfeng / gist:2882234
Created June 6, 2012 14:30
hive insert overwrite directory
INSERT OVERWRITE DIRECTORY '${OUTPUT_BUCKET}/results/report/region=${REGION}/dt=${DATE}'
SELECT
dt,
col1,
col2,
col3,
col4,
col5,
col6,
avg(col7) col7,
> tree
.
├── ext
│   ├── cli.sh
│   ├── debug.sh
│   ├── help.sh
│   ├── hiveserver.sh
│   ├── hwi.sh
│   ├── jar.sh
│   ├── lineage.sh
@aaronfeng
aaronfeng / etc-nginx-nginx.conf
Created July 30, 2012 14:15
nginx json log format
# /etc/nginx/nginx.conf
log_format main '{'
'"remote_addr": "$remote_addr",'
'"remote_user": "$remote_user",'
'"time_local": "$time_local",'
'"request": "$request",'
'"status": "$status",'
'"body_bytes_sent": "$body_bytes_sent",'
'"http_referer": "$http_referer",'
@aaronfeng
aaronfeng / gist:3236613
Created August 2, 2012 12:13
chef attributes quiz
# cookbook/attributes/default.rb
default[:foo][:bar][:size] = 42
# cookbook/recipes/default.rb
node.foo.bar.size
# what will above return?
@aaronfeng
aaronfeng / gist:3370486
Created August 16, 2012 14:25
edit last modified file
$EDITOR `find . \( ! -regex '.*/\..*' \) -type f | xargs ls -rt | tail -n 1`
@aaronfeng
aaronfeng / gist:3379083
Created August 17, 2012 14:23
PhillyAWS - 8/28/12

I can't decided on the title. Maybe you can help me. 3 - 7 is courtesy of @codeslinger.

title

  1. "BigData: Data Crunch on a Budget"
  2. "BI in the Cloud"
  3. "You're using Oracle for that? Big Data and you"
  4. "Better Answers from More Data: Today's Business Intelligence Architecture"
  5. "How Did They Know That? Getting Smart Answers like Google"