Skip to content

Instantly share code, notes, and snippets.

View astrsk-hori's full-sized avatar

Go Horie astrsk-hori

  • 株式会社アスタリスク
  • tokyo
View GitHub Profile
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<title>todo</title>
<script type="text/javascript"
src="http://codeorigin.jquery.com/jquery-1.10.2.min.js">
</script>
<script type="text/javascript"
src="http://cdnjs.cloudflare.com/ajax/libs/knockout/2.3.0/knockout-min.js">
@astrsk-hori
astrsk-hori / .zshrc
Last active August 29, 2015 14:06
oh-my-zshの大量のaliasをpecoで絞り込む ref: http://qiita.com/astrsk_hori/items/d01f83450b4181c2681b
function peco-alias(){
TARGET_ALIAS=$(alias | peco --query "$LBUFFER")
BUFFER=$(echo "$TARGET_ALIAS"|awk -F '=' '{print $1}')
CURSOR=$#BUFFER
zle clear-screen
}
zle -N peco-alias
bindkey '^@^a' peco-alias
@astrsk-hori
astrsk-hori / git-scp
Created September 24, 2014 09:06
gitで変更があるファイルをpecoで絞ってscp
#!/bin/zsh
GST_LIST=$(git status -s|awk '{print $2}'|peco|tr '\n' ' ')
echo $GST_LIST
echo '上記ファイルを転送して良ければyes'
read ANSWER
if test ${ANSWER} = "yes"; then
@astrsk-hori
astrsk-hori / Gruntfile.js
Created October 3, 2014 05:46
laravelにyoでangularJs&coffeescriptを使えるようにする。 ref: http://qiita.com/astrsk_hori/items/de77b992279bdf1c80c3
copy: {
dist: {
files: [{
expand: true,
dot: true,
cwd: '<%= yeoman.app %>',
dest: '<%= yeoman.dist %>',
src: [
'*.{ico,png,txt}',
'.htaccess',
@astrsk-hori
astrsk-hori / file0.txt
Created October 29, 2014 05:01
macのapache2でsslとオレオレ証明書の設定 ref: http://qiita.com/astrsk_hori/items/d7ce9636cfcfae5d96f8
cd /private/etc/apache2
sudo sh -c "openssl genrsa 2048 > server.key"
sudo sh -c "openssl req -new -key server.key > server.csr"
sudo sh -c "openssl x509 -days 3650 -req -signkey server.key < server.csr > server.crt"
@astrsk-hori
astrsk-hori / aaa.csv
Created March 12, 2015 06:01
csvや標準入力をsqlで取得できるqコマンド ref: http://qiita.com/astrsk_hori/items/fbe61e988f526d22efc9
a_id b_id a_name a_memo
1 1 aa1 a_memo1
2 2 aa2 a_memo2
3 3 aa3 a_memo3
4 4 aa4 a_memo4
5 5 aa5 a_memo5
6 6 aa6 a_memo6
7 7 aa7 a_memo7
8 8 aa8 a_memo8
9 9 aa9 a_memo9
@astrsk-hori
astrsk-hori / file0.txt
Last active August 29, 2015 14:18
php書くときに知っといた方が捗るvimの使い方かも ref: http://qiita.com/astrsk_hori/items/9be32e0ad89a62ed4f8c
brew install ctags
composer create-project laravel/laravel la5test --prefer-dist
@astrsk-hori
astrsk-hori / file0.txt
Created April 22, 2015 05:29
laravelのfacadeのパーシャルモックのメモ ref: http://qiita.com/astrsk_hori/items/efe290554b497c565470
// File::delete()メソッド:
File::shouldReceive('delete')->andReturn(true);
File::makePartial();
docker pull mysql
docker run --name mysql -e MYSQL_ROOT_PASSWORD=mysql -d -p 3306:3306 mysql
# 接続確認 passwordはmysqlになります。
mysql -h $(boot2docker ip) -uroot -p