Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@thenewvu
thenewvu / chroot_from_iso.txt
Last active November 19, 2023 13:57
A guide to create a chroot environment from an Ubuntu iso on Ubuntu
# download ubuntu iso
The iso version should be lower/equal than/to the host version.
# install uck (ubuntu customization kit)
run:
sudo apt-get install uck
# setup chroot environment from iso
@thenewvu
thenewvu / userChrome.css
Last active March 14, 2019 13:49
Some css files to customize Firefox internal UI (place at $(user-profile-dir)/chrome/)
/*
* darkern loading page background
*/
#browser vbox#appcontent tabbrowser,
#content,
#tabbrowser-tabpanels,
browser[type=content-primary],
browser[type=content] > html {
background: black !important
}
@thenewvu
thenewvu / pro.vim
Created April 14, 2018 07:55
minimal dark color scheme for {n}vim
" Author: Vu Le <thenewvu@gmail.com>
" Maintainer: Vu Le <thenewvu@gmail.com>
set background=dark
highlight clear
if exists("syntax_on")
syntax reset
endif
let g:colors_name="pro"
@thenewvu
thenewvu / cmakelist.txt
Created March 23, 2018 03:51
build bgfx examples for android using cmakelist with android-ndk-native-activity-sample
#
# Copyright (C) The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@thenewvu
thenewvu / record-vlog.sh
Created March 6, 2018 23:13
script to record my vlogs on mac osx
ffmpeg \
-f avfoundation \
-framerate 5 \
-pixel_format bgr0 \
-i 1 \
-c:v libvpx-vp9 \
-preset ultrafast \
-g 10 \
-capture_cursor 1 \
-cpu-used 8 \
@thenewvu
thenewvu / 20171111.log.md
Created November 11, 2017 07:01
20171111.log.md

Learn Golang: fmt.Println doesn't print anything in goroutines

Run the below example, you will see there was nothing printed from fmt.Println in exec(), why?

func longexec (name) {
  // simulate long execution
  for p := 0; p < 10 ; p++ {
@thenewvu
thenewvu / xorg.conf
Created April 23, 2017 13:04
Macbook Air mtrack driver options
Section "InputClass"
MatchIsTouchpad "on"
Identifier "Trackpad"
Driver "mtrack"
Option "Sensitivity" "0.40"
Option "FingerHigh" "5"
Option "FingerLow" "1"
Option "IgnoreThumb" "true"
Option "IgnorePalm" "true"
Option "TapButton1" "1"
@thenewvu
thenewvu / cVimrc
Created January 3, 2017 23:44
cVimrc
let smoothscroll="true"
let autohidecursor="true"
let autofocus="false"
let sortlinkhints="true"
let completeonopen="true"
let completionengines=["google"]
@thenewvu
thenewvu / tail-grep-mail.sh
Last active December 24, 2016 15:08
tail and grep a file, send mail when each line occurs
#!/bin/sh
sj=$1
to=$2
in=$3
on=$4
echo "sj=$sj"
echo "to=$to"
echo "in=$in"
@thenewvu
thenewvu / extension-groups.bak
Created September 26, 2016 14:06
chrome extension manager - extension group backup
<ExtGrpBakV2><group><key>GRP-Development</key><val>{"name":"Development","id":"Development","type":"extGrp","enabled":false,"items":["dogkpdfcklifaemcdfbildhcofnopogp","acacmjcicejlmjcheoklfdchempahoag","fhbjgbiflinjbdggehcddcbncdddomop","aicmkgpgakddgnaphhhpliifpcfhicfo"]}</val></group><group><key>GRP-Design</key><val>{"name":"Design","id":"Design","type":"extGrp","enabled":false,"items":["mcbpblocgmgfnpjjppndjkmgjaogfceg","ohcpnigalekghcmgcdcenkpelffpdolg","fppjbihjmidhgfmacekmdmkgppfcipbl"]}</val></group><group><key>GRP-Essential</key><val>{"name":"Essential","id":"Essential","type":"extGrp","enabled":true,"items":["oeopbcgkkoapgobdbedcemjljbihmemj","kimodcegbhclamjcbifgfaldeengbgij","mfembjnmeainjncdflaoclcjadfhpoim","mclkkofklkfljcocdinagocijmpgbhab","aapbdbdomjkkjkaonfhkkikfgjllcleb","immpkjjlgappgfkkfieppnmlhakdmaab","jpjjclfccoocnckcbonckikbjlipjion"]}</val></group><group><key>GRP-Entertaiment</key><val>{"name":"Entertaiment","id":"Entertaiment","type":"extGrp","enabled":false,"items":["jjphmlaoffndcn