This file contains hidden or 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
# setup RBENV's path | |
export RBENV_ROOT="$HOME/.rbenv" | |
if [ -d "$RBENV_ROOT" ]; then | |
if [ -d "$RBENV_ROOT/versions/$RBENV_VERSION" ]; then | |
export PATH="$RBENV_ROOT/versions/$RBENV_VERSION/bin:$PATH" | |
export PATH="$RBENV_ROOT/shims:$PATH" | |
else | |
export PATH="$RBENV_ROOT/bin:$PATH" | |
export PATH="$RBENV_ROOT/shims:$PATH" | |
fi |
This file contains hidden or 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
# Install development tools: | |
sudo apt-get update | |
sudo apt-get -y install build-essential git-core \ | |
make libc6-dev libssl-dev libssl-dev \ | |
libreadline6-dev zlib1g-dev libyaml-dev | |
# Install rbenv: | |
git clone git://github.com/sstephenson/rbenv.git ~/.rbenv | |
# Add rbenv to the path (for BASH): |
This file contains hidden or 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 | |
# enable mod_ext_filter | |
a2enmod ext_filter | |
# create temp config file | |
cat <<EOF > /tmp/haml_sass | |
# For HAML & SASS (http://d.hatena.ne.jp/ursm/20080923/1222195693) | |
LoadModule ext_filter_module libexec/apache2/mod_ext_filter.so |
This file contains hidden or 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 ruby | |
all=[*'0000'..'9999'];open('numbers.txt').each_line{|line|all[line.to_i]=nil};open('run_result.txt','w').puts all.compact! |
This file contains hidden or 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 | |
wget http://s3.amazonaws.com/alexa-static/top-1m.csv.zip | |
unzip top-1m.csv.zip | |
for l in `head -n 1000 top-1m.csv` | |
do | |
host=`echo -n $l|cut -d, -f2` | |
wget -O "$host.ico" "http://$host/favicon.ico" | |
done |
This file contains hidden or 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
class User{ | |
public Integer money; | |
public User(Integer money){ | |
this.money = money; | |
} | |
public Integer getMoney(){ | |
return this.money; | |
} |
This file contains hidden or 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 | |
############################################################################### | |
### For finding all secret codes in android ### | |
############################################################################### | |
# author: @ptantiku | |
# | |
# refer: http://forum.xda-developers.com/showthread.php?t=540483 | |
# | |
# ***************************************************************************** |
This file contains hidden or 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 | |
prefix_ip='10.10.10' | |
#collecting | |
for i in `seq 1 255` | |
do | |
wget --connect-timeout=1 -t 1 -O "$prefix_ip.$i.rom-0" "http://$prefix_ip.$i/rom-0" | |
done |
This file contains hidden or 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
<?php | |
# Downloading stock data, one file per date | |
# required packages: php5-cli wget | |
# downloaded files have format of: name, date(yymmdd), open, high, low, close, volume(stocks), value(baht) | |
$start_year = 2003; | |
for($y=$start_year; $y<=2014; $y++){ | |
for($m=1; $m<=12; $m++ ){ |
This file contains hidden or 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 | |
fromdate=$(date -d 2013-08-01 +"%Y%m%d") | |
todate=$(date +"%Y%m%d") | |
filter="สนามบินสุวรรณภูมิ" | |
for year in {2013..2014} | |
do | |
for month in {1..12} | |
do |
OlderNewer