This file contains 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
# | |
# 説明: | |
# カレントディレクトリにある空のディレクトリを検出して、 | |
# ディレクトリが空であればREPO_URLからgit cloneするワンライナー | |
ACCOUNT_NAME=nobiki | |
# REPO_URL="https://${ACCOUNT_NAME}@example.com/nobiki/" | |
REPO_URL="[email protected]:${ACCOUNT_NAME}/" | |
find ./ -type d -maxdepth 1 -empty | sed -e "s/\.\///g" | while read line; do echo -e "\e[1;32m-> $line \n \e[m" && git clone --recursive "$REPO_URL$line.git"; done |
This file contains 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
set dictionary=~/.vim/dict/robot-built-in.dict | |
set dictionary=~/.vim/dict/robot-selenium-library.dict | |
fun! CompleteSpace() | |
" Save cursor position | |
let l:save_cursor = getpos(".") | |
" Get word we just completed ('borrowed' from: http://stackoverflow.com/a/23541748/660921) | |
let l:word = matchstr(strpart(getline('.'), 0, col('.') - 1), '\k\+$') |
This file contains 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
.DEFAULT_GOAL := help | |
.PHONY: help | |
TS=`date +%Y%m%d%H%M%S` | |
hoge: ## hogehoge | |
echo hoge | |
moge: ## mogemoge | |
echo ${TS} |
This file contains 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
composer create-project laravel/laravel ./web v5.7.0 | |
sudo chmod -R 777 web/storage/ | |
tee ./web.conf << 'EOF' | |
server { | |
index index.php index.html; | |
server_name localhost; | |
error_log /var/log/nginx/error.log; | |
access_log /var/log/nginx/access.log; | |
root /web/public; |
This file contains 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
## | |
# HTTP | |
upstream example.local { | |
server 172.56.0.12; | |
# server 172.56.0.12:3000; | |
} | |
server { | |
autoindex off; | |
client_max_body_size 100M; |
This file contains 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 | |
ARGS=$@ | |
# match command only | |
if [ "git" == ${1} ]; then | |
expect -c " | |
set timeout 60 | |
spawn ${ARGS} |
This file contains 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 | |
ARGS=$@ | |
docker run --rm -i greymd/ojichat:latest ${ARGS} |
This file contains 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
crontab -l | tee /var/tmp/.crontab && vim /var/tmp/.crontab && crontab /var/tmp/.crontab && rm -f /var/tmp/.crontab |
This file contains 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
# | |
# Automatically generated file; DO NOT EDIT. | |
# Buildroot 2019.02.4 Configuration | |
# | |
BR2_HAVE_DOT_CONFIG=y | |
BR2_HOST_GCC_AT_LEAST_4_5=y | |
BR2_HOST_GCC_AT_LEAST_4_6=y | |
BR2_HOST_GCC_AT_LEAST_4_7=y | |
BR2_HOST_GCC_AT_LEAST_4_8=y | |
BR2_HOST_GCC_AT_LEAST_4_9=y |
This file contains 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 -eu | |
.DEFAULT_GOAL := help | |
.PHONY: help | |
STR = foo | |
$(eval TS := $(shell date +%Y%m%d%H%M%S%N)) | |
hoge: ## [hoge] make hoge STR=bar | |
@echo "STR: ${STR}" |