Skip to content

Instantly share code, notes, and snippets.

View vunhan's full-sized avatar
🏠
Working from home

Vu Nhan vunhan

🏠
Working from home
View GitHub Profile
int *ip; // pointer to integers
double *dp; // pointer to doubles
CUR_DIR=${PWD}
RES_DIR=${PROJECT_DIR}/${PROJECT}/Resources
EX_DIR=${RES_DIR}/Exported
rm -rf ${EX_DIR}/AppData/
cp -R ${RES_DIR}/AppData ${EX_DIR}/
WRD=class
NEW=aaa
@vunhan
vunhan / adblock
Last active December 15, 2015 20:39
127.0.0.1 api.adtimaserver.vn
# android.clients.google.com
127.0.0.1 dl.dict.laban.vn
127.0.0.1 example.com
127.0.0.1 ads.fptplay.net.vn
Installing Arch:
sudo vim /etc/pacman.conf
Update packages list: sudo pacman -Syy
run sudo pacman -Syu before installing any software (to update the repositories first)
* Timing issue:
- Change hardware clock to use UTC time:
sudo timedatectl set-local-rtc 0
@vunhan
vunhan / dota2.sh
Created April 26, 2016 05:09
not done yet
# ----------------------------------
# Step #2: User defined function
# ----------------------------------
pause(){
read -p "Press [Enter] key to continue..." fackEnterKey
}
# Looking in path?
path(){
echo "Looking in path: "
int main ( int argc, char *argv[] )
{
int array[5];
int *parray = &array[0];
int i = 0;
for ( i; i<5; ++i) {
/*array[i] = i+1;*/
printf("%d\t", array[i]);
}
#
# General configuration
#
# start-default-seat = True to always start one seat if none are defined in the configuration
# greeter-user = User to run greeter as
# minimum-display-number = Minimum display number to use for X servers
# minimum-vt = First VT to run displays on
# lock-memory = True to prevent memory from being paged to disk
# user-authority-in-system-dir = True if session authority should be in the system location
# guest-account-script = Script to be run to setup guest account
@vunhan
vunhan / tmux-cheatsheet.markdown
Created October 3, 2016 08:36 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@vunhan
vunhan / install.sh
Last active November 11, 2016 06:59
#!/bin/bash
echo "Installing packages..."
pacman -S xorg-xinit \
firefox \
fcitx fcitx-unikey \
fcitx-gtk2 fcitx-gtk3 fcitx-qt4 fcitx-qt5 fcitx-configtool \
qbittorrent \
aegisub
; Global settings for redshift
[redshift]
; Set the day and night screen temperatures
temp-day=5200
temp-night=3200
; Enable/Disable a smooth transition between day and night
; 0 will cause a direct change from day to night screen temperature.
; 1 will gradually increase or decrease the screen temperature.
transition=1