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
~/myApp ❯❯❯ sudo treeline lift ⏎ | |
Ensuring dependencies are up to date... | |
Preparing to preview app: "awesomeapp"... | |
Treeline preview is warming up... | |
Synchronizing app with Treeline mothership... | |
Calibrating machines... | |
Hold tight, this can take a moment... | |
error: A hook (`machines`) failed to load! | |
An error occurred while communicating with the Treeline mothership: |
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
N = 100000 | |
f = open("./bin.#{N}.dat", 'w') | |
result = [0, 0] | |
1.upto(N) do |i| | |
ret = rand() > 0.5 ? 1 : 0 | |
result[ret] += 1 | |
f.write ret | |
end |
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
binaries = [ | |
0b1111110, # 0 | |
0b0110000, # 1 | |
0b1101101, # 2 | |
0b1111001, # 3 | |
0b0110011, # 4 | |
0b1011011, # 5 | |
0b1011111, # 6 | |
0b1110000, # 7 | |
0b1111111, # 8 |
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
binaries = [ | |
0b1111110, # 0 | |
0b0110000, # 1 | |
0b1101101, # 2 | |
0b1111001, # 3 | |
0b0110011, # 4 | |
0b1011011, # 5 | |
0b1011111, # 6 | |
0b1110000, # 7 | |
0b1111111, # 8 |
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
auth_token = "your_token" | |
room_id = "your_room_id" | |
from = 'OpsWorks' | |
color = 'green' | |
message = 'hello!' | |
uri = URI.parse "https://api.hipchat.com/v1/rooms/message" | |
Net::HTTP.version_1_2 |
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/sh | |
# ---------------------------------------------------------------------- | |
# Install PHP & Zend Framework | |
# ---------------------------------------------------------------------- | |
# install development packages | |
#sudo yum -y groupinstall "Additional Development" "Development tools" | |
sudo yum -y groupinstall "Development tools" | |
sudo yum -y install 'openssl-devel' 'zlib-devel' 'pcre-devel' 'readline-devel' |
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/sh | |
cat <<EOS > /etc/yum.repos.d/10gen.repo | |
[10gen] | |
name=10gen Repository | |
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64 | |
gpgcheck=0 | |
enabled=1 | |
EOS |
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/sh | |
# install development packages | |
#sudo yum -y groupinstall "Additional Development" "Development tools" | |
sudo yum -y groupinstall "Development tools" | |
sudo yum -y install 'openssl-devel' 'zlib-devel' 'pcre-devel' 'readline-devel' | |
# register the repository of Zend Framework | |
cat <<EOS > /etc/yum.repos.d/zend.repo | |
[Zend] |
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
%%%------------------------------------------------------------------- | |
%%% @author devkato | |
%%% @copyright (C) 2012, devkato | |
%%% @doc | |
%%% | |
%%% @end | |
%%%------------------------------------------------------------------- | |
-module(erlproxy_sup). | |
-author("devkato"). | |
-vsn("0.0.1"). |
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/sh | |
usage() { | |
echo "Usage: hoge.sh -h hostname -m master_hostname -p puppet_port" | |
exit 2 | |
} | |
params=`getopt "h:m:p:i:k:" $*` | |
set -- $params |
NewerOlder