Category Archives:

Made some fully procedural neon wings with #ue4niagara
Twitter Discussion | 中文直播讲解
Anime style death ray and smoke using #ue4niagara
Tried to mimic hand drawn elements with exaggerated physics and distance function. Got some pretty unique looks😈
Twitter Discussion | 中文技术讲座
Procedural wave splash generator made with #UE4Niagara and distance field. Pretty happy about it💓
Twitter Discussion | 中文解析文章
Energy armor shader
Twitter Discussion | 英文PPT
Continue reading

Perforce backup with rsync

First thing to know, I don’t really want to backup the entire perforce database since it’s huge and requires a lot of extra steps. I’m only backing up the latest version in case a doom fire happens to my apartment.
The scheduled backup is run on my p4 server A, in order to run a scheduled backup plan to push my newest project version to server B.

Create client(aka workspace) for the server A itself.

p4 -d `pwd` client -t Vuth_Auri -o Auri_Backup | p4 client -i
p4 client Auri_Backup

Then run a script in crontab.

51 * * * * bash /home/vuth/__backup/runBackup.sh

$cat runBackup.sh

p4 sync
rsync -rtz -e "ssh -p 1111 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i /home/vuth/.ssh/id_rsa_somekey" /home/vuth/__backup/p4 vuth@123.123.123.123:/home/vuth/p4

First line get the latest version of your project to the workspace.
Second line runs rsync over a ssh connection to your remote server B.

And that’s it. Notice that this is incremental. You can add –delete to the rsync command to remove garbage from remote server B. I left it for extra safety.

一年多没更新了,来一发。
之前的《神叽的阿米拉串》,不太想发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