This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Open Mac OS x terminal | |
2. Go to Preferences -> Settings -> Keyboard | |
3. Redefine keys to "Send string to shell" as follows: | |
Key Escape Sequence | |
Home \033[1~ | |
End \033[4~ | |
Page Up \033[5~ | |
Page Down \033[6~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ec2hm=`curl -s http://169.254.169.254/latest/meta-data/public-ipv4`; echo ec2-${ec2hm//./-}.compute-1.amazonaws.com; unset ec2hm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var c = require('riak-js').getClient({ host: 'hostname', port: 8098 }); | |
var mr = c.add('bucket').map(function m(v){return [1]}).reduce(function(v) { return [v.reduce(function(t, val) { return t + val; }, 0)]}); | |
mr.run({timeout: 10000000}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ADD JAR s3://<s3-bucket>/jars/hive_contrib-0.5.jar; | |
CREATE TEMPORARY FUNCTION now as 'com.mt.utils.udf.Now'; | |
CREATE TEMPORARY FUNCTION user_agent_f as 'com.mt.utils.UserAgent'; | |
set hive.merge.mapredfiles=true; | |
set hive.merge.mapfiles=true; | |
set hive.merge.size.per.task=500000000; | |
CREATE EXTERNAL TABLE data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
apt-get -y update | |
apt-get -y install mdadm | |
echo "y" | mdadm --create /dev/md0 --level 0 --raid-devices 2 /dev/xvdb /dev/xvdc | |
echo "DEVICE /dev/xvdb /dev/xvdc" > /etc/mdadm/mdadm.conf | |
mdadm --detail --scan >> /etc/mdadm/mdadm.conf | |
blockdev --setra 65536 /dev/md0 | |
mkfs.ext3 -F /dev/md0 | |
mkdir -p /mnt/dataraid && mount -t ext3 /dev/md0 /mnt/dataraid -o noatime | |
echo "/dev/md0 /mnt/dataraid ext3 noatime 0 0" | tee -a /etc/fstab |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget -O s3c.zip http://goo.gl/skBTi && unzip s3c.zip && cd ./s3cmd-1.1.0-beta3 && python setup.py install && cd ../ && rm -rf ./s3c.zip ./s3cmd-1.1.0-beta3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "syntax on" >> ~/.vimrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# first install erlang using the R13b04 formula | |
brew install https://github.com/mxcl/homebrew/raw/810d52f4a386ea9e2b837030120ffd69cad73722/Library/Formula/erlang.rb | |
# now you are free to install riak | |
brew install riak |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
adb remount | |
adb push ~/android.hosts /system/etc/hosts |