Skip to content

Instantly share code, notes, and snippets.

phabricator を ubuntu12.04.01 LTS にインストールした。(2013/02)

参考資料

事前準備

Distributor ID: Ubuntu
Description:    Ubuntu 12.04.1 LTS
Release:        12.04
@Qooh0
Qooh0 / gist:85dd2282d4f6c28f5fbd
Created June 4, 2014 13:23
y が入力されるまで 消さない
#!/bin/bash
args=$@
echo そのファイルを捨ててしまうなんて、とんでもない!
while true; do
echo 'ほんとうに捨てますか?'
read ans;
if [ 'y' = $ans ]; then
/bin/rm -rf $args
@Qooh0
Qooh0 / small api test
Created October 2, 2014 01:25
curl で API を適当にテスト
#!/usr/bin/env bash
SH_DIR=$(dirname $0)
if [ $# -ne 1 ]; then
echo '引数はひとつ'
exit
fi
ARG=$1
@Qooh0
Qooh0 / redis scripts
Created October 19, 2014 03:42
redis start/stop scripts
#!/bin/env bash
if [ $# -ne 1 ]; then
echo '引数はひとつ'
exit
fi
ARG=$1
start() {
pong=$(redis-cli ping 2>/dev/null )
@Qooh0
Qooh0 / file0.rb
Created November 30, 2014 09:14
Python と ruby のスライス memo ref: http://qiita.com/Qooh0@github/items/5cf2b3ea869716dcaf5a
irb(main):014:0> a = [1, 2, 3, 4, 5]
=> [1, 2, 3, 4, 5]
irb(main):024:0> a[0..3]
=> [1, 2, 3, 4]
irb(main):018:0> a[1..3]
=> [2, 3, 4]
@Qooh0
Qooh0 / delete git branches
Created December 27, 2014 10:16
delete git branches
git ブランチの削除方法あれこれ
================================
master にマージ済みのローカルブランチの削除
--------------------------------------
```
git branch -d $branch_name
```
#!/bin/bash
# Script for placing sudoers.d files with syntax-checking
# Making a temporary file to contain the sudoers-changes to be pre-checked
TMP=$(mktemp -t vagrant_sudoers)
cat /etc/sudoers > $TMP
cat >> $TMP <<EOF
# Allow passwordless startup of Vagrant when using NFS.
Cmnd_Alias VAGRANT_EXPORTS_ADD = /usr/bin/su root -c echo '*' >> /etc/exports
@Qooh0
Qooh0 / hhkb Lite 2 を Macに接続した時の設定.md
Created April 11, 2018 22:00
Happy Hacking Keyboard Lite 2 を Mac で使うように設定する
@Qooh0
Qooh0 / RemoveDiskUsage.sh
Created May 14, 2018 03:13
Mac で不要なファイルの削除
vagrant box prune;
brew cleanup;
@Qooh0
Qooh0 / homestead_copy.md
Created May 19, 2018 22:28
Homestead 環境をコピーして動くようにする
  1. change name in scripts/homestead.rb
  2. change .vagrant/machines/homestead-7/virtualbox/index_uuid
  3. change .vagrant/machines/homestead-7/virtualbox/id