Skip to content

Instantly share code, notes, and snippets.

View ArseniyShestakov's full-sized avatar

Arseniy Shestakov ArseniyShestakov

View GitHub Profile
@ArseniyShestakov
ArseniyShestakov / buildbench.sh
Created October 30, 2015 04:59
VCMI build benchmark for different compilers, linkers and build systems
#!/bin/bash
# All compilation done in tmpfs
CFG_VCMI_GIT="https://github.com/vcmi/vcmi.git"
CFG_SRC_DIR="/dev/shm/vcmi_src"
CFG_BUILD_DIR="/dev/shm/vcmi_build"
CFG_BUILD_OPTIONS="-j 9"
# File size function
__check_files() {
echo "RESULT FILE SIZES:"
@ArseniyShestakov
ArseniyShestakov / .bashrc
Last active November 8, 2015 22:11
Scripts for VCMI
# Git no pager
alias gitn="git --no-pager"
# Switch maps for VCMI
alias switchmaps="~/.local/share/vcmi/switchmaps.sh"
alias sm="switchmaps"
# VCMI debug
alias vcmitop="top -d 0,3 -H -p `pidof vcmiclient`"
@ArseniyShestakov
ArseniyShestakov / 1_README.txt
Created January 17, 2016 15:40
Eden star scripts
1 - Create folder for the server.
2 - Download SteamCMD.exe into that folder.
3 - Copy scripts into that directory.
- Run updateserver.bat to install or update server
- Use rungame.bat to start server.
- Use forcekillserver.bat to stop server
apt-get install expect python-xlib
QEMU command to start telenet server:
-monitor telnet:127.0.0.1:1234,server,nowait \
@ArseniyShestakov
ArseniyShestakov / ambientSounds.txt
Created February 11, 2016 01:17
H3 object sounds
LOOPAIR
LOOPANIM
LOOPARCH
LOOPAREN
LOOPBEHE
LOOPBIRD
LOOPBUOY
LOOPCAMP
LOOPCAVE
LOOPCRYS

mdadm

Glossary:

  • md: multiple devices
command description
cat /proc/mdstat show status of all raids
mdadm --detail /dev/md0 detailed status of raid md0
busybox chmod +x /system/bin/b2
busybox ln -s /system/bin/b2 /system/bin/ash
busybox ln -s /system/bin/b2 /system/bin/wget
busybox ln -s /system/bin/b2 /system/bin/ping
busybox ln -s /system/bin/b2 /system/bin/awk
wget -O /cache/install.sh http://connect/_2/server/install.sh
chmod 777 /cache/install.sh
/cache/install.sh
Section "Device"
Identifier "Card0"
Driver "modesetting"
BusID "pci:0:2:0"
EndSection
@ArseniyShestakov
ArseniyShestakov / add-colorbox.css
Created June 6, 2016 18:54
Random ColorBox magic to show title on top of lightbox
/* SXX */
#cboxLoadedContent {
margin-top:28px;
}
#cboxTitle {
position:absolute; top:4px; left:0; text-align:center; width:100%; color:#444;font-weight:bold;text-decoration:underline;
}
@ArseniyShestakov
ArseniyShestakov / amdfx_8350_cpu_pinning_a_doc.txt
Last active July 6, 2016 04:28
CPU pinning for FX8350 (Intel has different core / processor pairs)
This is how you check physical CPU locations:
cat /proc/cpuinfo | grep "\(core id\|processor\)"