Skip to content

Instantly share code, notes, and snippets.

View corrupt952's full-sized avatar
💬
Studying English

K@zuki. corrupt952

💬
Studying English
View GitHub Profile
#!/bin/bash
shopt -s expand_aliases
# バージョンだけをするためのコマンドエイリアス
alias cutcut="cut -d',' -f2 | cut -d' ' -f3 | head -n 1"
# 抽出
CHANGE_LOG=`curl -s https://raw.github.com/joyent/node/master/ChangeLog | \egrep -e 'Version [0-9]+\.[0-9]+\.[0-9]+'`;
@corrupt952
corrupt952 / Setup nvm (curl)
Last active December 27, 2015 16:49
nvmをインストールするためのスクリプト
#!/bin/bash
shopt -s expand_aliases
# エイリアス
alias cutcut="cut -d',' -f2 | cut -d' ' -f3 | head -n 1"
if [ `uname` = "Darwin" ]; then
alias echo='/bin/echo'
fi
@corrupt952
corrupt952 / ファイルから読み込み表示
Created December 10, 2013 14:27
仕事で使用するかもしれないので忘れないようにメモ
while read LINE; do
echo "${LINE}"
done < file.txt
@corrupt952
corrupt952 / MapUtil.java
Created February 5, 2014 05:09
ヒュベニの公式(実装サンプル)
public final class MapUtil {
private MapUtil() {}
/**
* 2つの経緯度から距離を求める
*
* @param lat1
* @param lng1
* @param lat2
* @param lng2
@corrupt952
corrupt952 / Jenkins
Last active August 29, 2015 13:56
CentOSにJenkinsをインストールする
$ sudo wget -O /etc/yum.repo.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo
$ sudo rpm --import http://pkg.jenkins-ci.org/redhat/jenkins-ci.org.key
$ sudo yum install -y jenkins
@corrupt952
corrupt952 / rbenv_install.bash
Created February 24, 2014 02:26
rbenvのインストールスクリプト
#!/bin/bash
git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
mkdir -p ~/.rbenv/plugins
git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
echo "export PATH=\"~/.rbenv/bin:~/.rbenv/shims:\$PATH\"" >> ~/.bash_profile
echo 'rbenv init - >> /dev/null' >> ~/.bash_profile
@corrupt952
corrupt952 / down.sh
Last active August 29, 2015 14:21
SourceTree + Vagrant + Rails
#!/bin/sh
vagrant halt
# VPC
resource "aws_vpc" "khasegawa" {
cidr_block = "10.0.0.0/16"
instance_tenancy = "default"
# ここが今回の話
enable_dns_support = true
enable_dns_hostnames = true
}
# Gateway
+bundle_install:
sh>: bundle install
#Port 22
Port 22222