Skip to content

Instantly share code, notes, and snippets.

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

Frost Wong lovelock

🏠
Working from home
View GitHub Profile
!-------------------------------------------------------------------------------
! Xft settings
!-------------------------------------------------------------------------------
Xft.dpi: 96
Xft.antialias: false
Xft.rgba: rgb
Xft.hinting: true
Xft.hintstyle: hintslight
@lovelock
lovelock / ctex-xecjk-winfonts.def
Created April 27, 2014 07:09
definition for font configuration with texlive
% ctex-xecjk-winfonts.def: Windows 的 xeCJK 字体设置,默认为六种中易字体
% vim:ft=tex
\setCJKmainfont[BoldFont={SimHei},ItalicFont={KaiTi}]{SimSun}
\setCJKsansfont{SimHei}
\setCJKmonofont{FangSong}
@lovelock
lovelock / gist:d282ee401862ece816da
Created December 6, 2014 01:34
start x at login
[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && exec startx
@lovelock
lovelock / .Xdefaults
Last active August 29, 2015 14:10 — forked from yevgenko/.Xdefaults
!-------------------------------------------------------------------------------
! Xft settings
!-------------------------------------------------------------------------------
Xft.dpi: 96
Xft.antialias: false
Xft.rgba: rgb
Xft.hinting: true
Xft.hintstyle: hintslight
@lovelock
lovelock / svndiff.sh
Created January 26, 2015 08:40
svn-diff advanced configuration
# This is the configuration of Wang Qingchun, who uses local Vim7.4
# instead of the system wide Vim 7.0
DIFF="$HOME/.local/bin/vimdiff +colo\molokai"
# Subversion provides the paths we need as the sixth and seventh
# parameters.
LEFT=${6}
RIGHT=${7}
# Call the diff command (change the following line to make sense for
@lovelock
lovelock / config
Created January 26, 2015 08:41
svn config snippet
[helpers]
diff-cmd = /home/wangqingchun/tools/svndiff.sh
@lovelock
lovelock / config.json
Created March 4, 2015 08:38
composer config for China mainland users
{
"config": {},
"repositories": [
{
"type": "composer",
"url": "http://pkg.phpcomposer.com/repo/packagist/"
},
{
"packagist": false
}
@lovelock
lovelock / asoundrc
Created March 13, 2015 16:49
make my clevo laptop sing
pcm.!default {
type hw
card 1
device 2
}
ctl.!default {
type hw
card 1
}
@lovelock
lovelock / imagePickerControllerDidCancel.swift
Created November 20, 2015 11:39
Why do I need to call this block of code when Cancel of imagePickerController is tapped?
func imagePickerControllerDidCancel(picker: UIImagePickerController) {
dismissViewControllerAnimated(true, completion: nil)
}
## Configure eth0
#
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
NM_CONTROLLED="yes"
ONBOOT=yes
HWADDR=A4:BA:DB:37:F1:04
TYPE=Ethernet
BOOTPROTO=static