Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View mapi's full-sized avatar
🈚
🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚

mapi mapi

🈚
🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚🈚
View GitHub Profile
@mapi
mapi / Dockerfile
Created October 10, 2016 03:37
rundeck
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 December 15, 2015 02:49
JSON.NETのDLリンクコロコロ変わるみたいなので自分でDLするよう促すようにした。 Core.dllが更新されてたのに追随
#!/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 December 11, 2012 05:57
履歴付きオーバーレイ
#!/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""
HOME=/root
OLDPWD=/root
LOGNAME=root
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
SHELL=/bin/sh
PWD=/
if [ -e /dev/vboxguest ] ; then
xset -r 49
fi
@mapi
mapi / gist:1090344
Created July 18, 2011 19:02
minecraft
こうあったときに
■■■■■■■■■■■■■■■■■■■■■
■■■■■■■■■■■■■■■■■■■■■
■■■■■■■■■■■■■■■■■■■■■
■■■■■■■■■■■■■■■■■■■■■
■■■■■■■■■■■■■■■■■■■■■
■■■■■■■■■■■■■■■■■■■■■
こうやるのが効率的?
■□■■□■■□■■□■■■■■■■■■■
#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`"
# 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 June 6, 2011 03:49
unbound for runit
#!/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
:
#!/bin/sh
f0=$(cd $(dirname ${0});pwd)
. ${f0}/lib/function.sh