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
#!/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 | |
# 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
# 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
# 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 |
NewerOlder