一年多没更新了,来一发。
之前的《神叽的阿米拉串》,不太想发public,不过反正博客没人看。

文件名是14年的,对时间的感知越来越快(或者说慢)。
“Wait for your 30s. You’re fucked.”
Filming实在没法直接找到partner,暂时游戏业停靠中。目前Unity,在学Unreal做自己的demo,想法很多时间太紧。
Asirikuy的交易framework很不错,在用,没停。

本想接着作配乐讲
迷途巫女的慌张
剩的mana只够召唤
一包辣条 怎么办
Continue reading

Bukkit定时重启bash脚本,GNU Screen走着

Bukkit服务器我一直用GNU Screen跑,隔两天有时候会不稳定要重启。好麻烦根本就不关心为什么,搞定就行。有bukkit插件可以实现但是咱多没自尊用那个。虽然感觉bash操作Screen也挺邋遢的.. 但是好用!其实不然的话怎么操作后台,nohup倒腾输入流什么的太麻烦了,这种用途还是terminal模拟器好看。

#!/bin/bash
#/home/bukkit/restart.sh

i=0
while (( $i < 5 ))
do
    if [ "`ps aux|grep -e '^bukkit'|grep SCREEN`" != "" ]; then
        su bukkit -c 'screen -S bukkit -X stuff 'stop`echo -ne '\015'`'' #`echo -ne '\015'` 等于敲下回车
        echo "`date` restart.sh:" 'Stoping bukkit...'
        ((i+=1))
        sleep 5

    else
        ((i+=100))
    fi
done

if (( $i == 100 )); then
    echo "`date` restart.sh:" 'Bukkit was not running. Starting...'
fi

if (( $i == 5 )); then
    kill `ps aux|grep bukkit|awk '{print $2}'`
    echo "`date` restart.sh:" 'Forcibly killing bukkit...'
    sleep 1
fi

if [ "`ps aux|grep -e '^bukkit'|grep SCREEN`" != "" ]; then
    echo "`date` restart.sh:" "ERROR: Couldn't stop bukkit. Exiting."
    exit 1
fi

bash /home/bukkit/start.sh

exit 0

Continue reading

暴力调整Oculus Rift的瞳距设置

A ruthless way to modify your Oculus Rift’s IPD (Interpupillary Distance)

TL;DR: Pictures say it all.

IPD (interpupillary distance) is basically the distance between the center of your two eyeballs. The average value is 63mm~65mm, which Oculus Rift DK is designed for(64mm). If yours is too wide or narrow beyond that you’ll notice how the image in Rift doesn’t focus too well horizontally, which is uncomfortable and may lead to sickness.

My IPD is extremely wide, 72mm (please, I’m still handsome). After a while’s use I knew this is not something I can just ignore so I did some research. The problem turned out to be pretty common, this post shows plastic adapters user bwhill designed to adjust the IPD to specified value. But he’s only selling 3D-printed products not sharing or selling the blueprint and it’s too much of a wait to ship to china. So I penned a few lines and plugged in my heat knife, it’s not pretty but it had the job done.

Continue reading