一年多没更新了,来一发。
之前的《神叽的阿米拉串》,不太想发public,不过反正博客没人看。
文件名是14年的,对时间的感知越来越快(或者说慢)。
“Wait for your 30s. You’re fucked.”
Filming实在没法直接找到partner,暂时游戏业停靠中。目前Unity,在学Unreal做自己的demo,想法很多时间太紧。
Asirikuy的交易framework很不错,在用,没停。

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

Bukkit scheduled restart script (bash interacting with GNU Screen)

I run bukkit server in GNU Screen. Natively bukkit server becomes unstable after two days or so thus scheduled restarts are needed. Using one of those server-admin plugins is viable but anyone with self-respect should avoid that 🙂
While bash interacting with Screen has a certain kludge feel it’s fun and efficient. Nohup works but your need to pipe input and shit. Intuitive terminal simulators are better for this usage.

#!/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'` generates a Return stroke
        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

Read More

BWV 1007 Prelude On Guitar


Loved it, tried playing it with metal tone. Took a lot of effort to get it even remotely acceptable. Fantastic practicing material but I’m DONE with it. I never played classic music and thought this one was not that hard. I made a big mistake..
Youtube

ssh -D tunneling via multiple hops

#!/bin/bash

export SSHPASS=host0passwd
screen -dmS tunnel0 bash -c "
while :
do
    sshpass -e ssh -L 9900:host1:22 user0@host0 -N
#Redirect connection to localhost:9900 to host1:22, while routing the connection through host0 as user0.
    sleep 1
done
"

export SSHPASS=host1passwd
screen -dmS tunnel1 bash -c "
while :
do
    sshpass -e ssh -D *:1234 user1@localhost -p 9900
#Now localhost:9900 equals to host1:22, so there's that. Use -D *:1234 to open the interface to the LAN, or localhost:1234 if you want local only. Then treat port 1234 as your easy SOCKS proxy, dog.
    sleep 1
done
"

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.

Read More

Use Kinect LiDAR to assist camera matchmoving in PFTrack

So yea I got the idea becaues I wanted to deploy some close-up shots in my small project, but close-ups are always a pain to matchmove according to my experience. We know that this device’s resolution is quite limited, so does it work?

Couldn’t find anybody done the same thing using this low cost toy on Internet, or at least they didn’t post it. So here you go, the result turns out neat and I’m really happy with it. Notice at the end of the clip, the shot is pretty close and it worked fine. Video:


Youtube
Read More