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
| { | |
| "AWSTemplateFormatVersion" : "2010-09-09", | |
| "Description" : "AWS CloudFormation Sample Template WordPress_Single_Instance: WordPress is web software you can use to create a beautiful website or blog. This template installs a single-instance WordPress deployment using a local MySQL database to store the data. It demonstrates using the AWS CloudFormation bootstrap scripts to install packages and files at instance launch time. **WARNING** This template creates an Amazon EC2 instance. You will be billed for the AWS resources used if you create a stack from this template.", | |
| "Parameters" : { | |
| "KeyName" : { | |
| "Description" : "Name of an existing EC2 KeyPair to enable SSH access to the instances", | |
| "Type" : "String" |
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
| wget http://ftp.riken.jp/net/apache/mahout/0.7/mahout-distribution-0.7-src.tar.gz | |
| tar -xzf mahout-distribution-0.7-src.tar.gz | |
| cd mahout-distribution-0.7 | |
| mvn install -DskipTests | |
| sudo mv ../mahout-distribution-0.7 /usr/local/mahout | |
| echo \#\#\ Mahout >> ~/.bashrc | |
| echo export\ PATH=/usr/local/mahout/bin:\$PATH >> ~/.bashrc | |
| source ~/.bashrc |
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
| site :opscode | |
| cookbook 'nginx' |
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 | |
| # Build tools and dependencies | |
| sudo yum install git gcc gcc-c++ make openssl-devel -y | |
| # Install RBENV | |
| git clone git://github.com/sstephenson/rbenv.git ~/.rbenv | |
| echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile | |
| echo 'eval "$(rbenv init -)"' >> ~/.bash_profile |
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
| module BlockSortable | |
| def encode | |
| [ | |
| matrix.map(&:last).join, | |
| matrix.index(self) | |
| ] | |
| end | |
| def matrix | |
| str = self.dup |
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/zsh | |
| tmux set-window-option -g window-status-current-bg yellow | |
| ssh $1 | |
| tmux set-window-option -g window-status-current-bg default |
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
| $ brew install elixir | |
| $ elixir -v | |
| Elixir 1.0.5 | |
| $ brew install postgresql | |
| $ createdb # データベース追加 | |
| $ createuser postgres # postgresユーザを追加 | |
| $ psql | |
| (username)=\# ALTER USER postgres CREATEDB; # DB作成できるように |
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 Human | |
| def say | |
| puts "hello" | |
| end | |
| end | |
| module PartyPeople | |
| refine Human do | |
| def say | |
| puts "hooooo!!!" |
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 Human | |
| def say | |
| puts "hello" | |
| end | |
| end | |
| module AnyModule | |
| class ::Human | |
| def say | |
| puts "hooooo!!!" |
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
| require 'aozora' | |
| Aozora.titles.each do |title| | |
| define_method(title) do |size = 100| | |
| Aozora.public_send(title, size) | |
| end | |
| end |
OlderNewer