Skip to content

Instantly share code, notes, and snippets.

View naohiro-m's full-sized avatar
🏠
Working from home

nao naohiro-m

🏠
Working from home
View GitHub Profile
#!/bin/bash
set -x
export SHA1=`echo ${CIRCLE_SHA1} | cut -c1-7`
export ENV=`echo $1 | rev | cut -d \- -f1 | rev`
echo "hi"
if [ $? -eq 0 ]; then
export SL_COLOR="good"
@naohiro-m
naohiro-m / td-agent.logrotate
Created June 19, 2023 13:37
td-agent logrotate setting
/var/log/td-agent/*.log {
daily
rotate 10
compress
delaycompress
notifempty
create 640 td-agent td-agent
sharedscripts
postrotate
pid=/var/run/td-agent/td-agent.pid
@naohiro-m
naohiro-m / get-keys-for-github-user.sh
Last active June 19, 2023 13:36
Put public keys for a github user in ~/.ssh/authorized keys with mucho ease
IFS="$(printf '\n\t')"
mkdir -p ~/.ssh
if ! [[ -f ~/.ssh/authorized_keys ]]; then
echo "Creating new ~/.ssh/authorized_keys"
touch ~/.ssh/authorized_keys
fi
user=$1
@naohiro-m
naohiro-m / GistList!.md
Last active June 19, 2023 13:59
Try GistList for iOS

GistList: TODO for coders