Skip to content

Instantly share code, notes, and snippets.

Avatar
🈚
🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚

mapi mapi

🈚
🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚
View GitHub Profile
View Dockerfile
FROM openjdk:8-jre-alpine
ENV user rundeck
ENV group rundeck
RUN apk --update add ca-certificates curl && \
rm -rf /tmp/* /var/tmp/* /var/cache/apk/*
RUN mkdir -p /opt && \
addgroup -g 1000 ${group} && \
@mapi
mapi / setup.sh
Last active Dec 15, 2015
JSON.NETのDLリンクコロコロ変わるみたいなので自分でDLするよう促すようにした。 Core.dllが更新されてたのに追随
View setup.sh
#!/bin/bash
install_path="${HOME}"
temp="$(mktemp -d)"
current=$(cd $(dirname $0);pwd)
cd ${temp}
wget "http://www.misuzilla.org/~mayuki/dist/twitterircgateway/TwitterIrcGateway-20100513.zip"
wget "http://www.misuzilla.org/~mayuki/dist/twitterircgateway/TwitterIrcGatewayCore.dll-20130405"
wget "http://www.misuzilla.org/~mayuki/dist/twitterircgateway/addins/Misuzilla.Applications.TwitterIrcGateway.AddIns.RevealOnewayFollowAddIn.dll-20130305"
wget "http://mashiro.org/dev/tig/bind/Spica.Applications.TwitterIrcGateway.AddIns.Bind.dll.201301315"
@mapi
mapi / gist:4256218
Created Dec 11, 2012
履歴付きオーバーレイ
View gist:4256218
#!/bin/bash
BACKUP="/path/backup"
SNAPSHOT=$(date +%Y/%m/%d-%H:%M:%S)
mkdir -p "${BACKUP}/${SNAPSHOT}"
rsync -avz --delete --link-dest="${BACKUP}/latest" remote:/path/to/sync "${BACKUP_DIR}/${SNAPSHOT}"
ln -n -f -s "${BACKUP}/${SNAPSHOT}" "${BACKUP}/latest""
View gist:2413141
HOME=/root
OLDPWD=/root
LOGNAME=root
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
SHELL=/bin/sh
PWD=/
View gist:1681331
if [ -e /dev/vboxguest ] ; then
xset -r 49
fi
View gist:1090344
こうあったときに
■■■■■■■■■■■■■■■■■■■■■
■■■■■■■■■■■■■■■■■■■■■
■■■■■■■■■■■■■■■■■■■■■
■■■■■■■■■■■■■■■■■■■■■
■■■■■■■■■■■■■■■■■■■■■
■■■■■■■■■■■■■■■■■■■■■
こうやるのが効率的?
■□■■□■■□■■□■■■■■■■■■■
View gist:1073843
#screenでssh-agentを使いまわす
function ssh-init {
local SSH_AUTH_SOCK_DIR="$HOME/.tmp/ssh-agent"
#ここは初めてか?
if [ ! -d ${SSH_AUTH_SOCK_DIR} ]; then
mkdir -p ${SSH_AUTH_SOCK_DIR}
chmod 700 ${SSH_AUTH_SOCK_DIR}
fi
#ソケット作る
AGENT="${SSH_AUTH_SOCK_DIR}/`hostname`"
View gist:1009720
# setup root jail
if [ -s /etc/localtime ]; then
[ -d ${rootdir}/etc ] || mkdir -p ${rootdir}/etc ;
if [ ! -e ${rootdir}/etc/localtime ] || /usr/bin/cmp -s /etc/localtime ${rootdir}/etc/localtime; then
cp -fp /etc/localtime ${rootdir}/etc/localtime
fi;
fi;
if [ -s /etc/resolv.conf ]; then
[ -d ${rootdir}/etc ] || mkdir -p ${rootdir}/etc ;
if [ ! -e ${rootdir}/etc/resolv.conf ] || /usr/bin/cmp -s /etc/resolv.conf ${rootdir}/etc/resolv.conf; then
@mapi
mapi / gist:1009712
Created Jun 6, 2011
unbound for runit
View gist:1009712
#!/bin/sh
PATH=/usr/local/bin:/usr/bin:/bin
EXEC="/package/admin/unbound/sbin/unbound"
rootdir="/package/admin/unbound/etc/unbound"
#setup jail
if [ -s /etc/localtime ]; then
[ -d ${rootdir}/etc ] || mkdir -p ${rootdir}/etc ;
if [ ! -e ${rootdir}/etc/localtime ] && /usr/bin/cmp -s /etc/localtime ${rootdir}/etc/localtime; then
:
View gist:988571
#!/bin/sh
f0=$(cd $(dirname ${0});pwd)
. ${f0}/lib/function.sh
You can’t perform that action at this time.