Skip to content

Instantly share code, notes, and snippets.

View weakish's full-sized avatar

weakish weakish

View GitHub Profile
@weakish
weakish / config
Created July 5, 2010 12:35
#fcitx 4.3.3 (all files should in GBK) configs #recycle
# note: this config file should saved in GBK encoding.
[程序]
显示字体(中)=AR PL ShanHeiSun Uni
显示字体(英)=Courier New
显示字体大小=12
主窗口字体大小=11
字体区域=zh_CN.UTF-8
是否使用AA字体=1
是否使用粗体=1
@weakish
weakish / startup
Created July 5, 2010 12:38
#fluxbox config files #recycle
# fluxbox startup-script:
#
# Lines starting with a '#' are ignored.
# You can set your favourite wallpaper here if you don't want
# to do it from your style.
#
# bsetbg -f ~/pictures/wallpaper.png
#
# This sets a black background
@weakish
weakish / xmodmap_file
Created July 5, 2010 10:50
swap Super and Ctrl #recycle
remove Mod4 = Super_L
remove Mod4 = Super_R
remove Control = Control_L
remove Control = Control_R
keysym Control_L = Super_L
keysym Super_L = Control_L
keysym Control_R = Super_R
keysym Super_R = Control_R
add Mod4 = Super_L
add Mod4 = Super_R
@weakish
weakish / autostart.sh
Created July 5, 2010 12:17
#openbox #configs #recycle
# This shell script is run before Openbox launches.
# Environment variables set here are passed to the Openbox session.
# Set a background color
BG=""
if which hsetroot >/dev/null; then
BG=hsetroot
else
if which esetroot >/dev/null; then
BG=esetroot
@weakish
weakish / .docutils
Created July 5, 2010 12:23
#python-docutils configs #recycle
[general]
# Equivalent to --time command-line option, results in
# date/timestamp like "2001-12-21 18:43 UTC":
datestamp: %Y-%m-%d %H:%M UTC
title: on
source_link: on
# language_code:
[restructuredtext parser]
rfc_references: on
@weakish
weakish / .Xresources
Created July 5, 2010 14:24
.Xresources #Emacs #xft #xterm #xvt #recycle
Emacs.font: DejaVu Sans Mono:pixelsize=22
Emacs.geometry: 74x23
Emacs.FontBackend: xft
Xft.dpi: 126
Xft.hinting: None
xterm*font: -*-fixed-medium-r-*-*-18-*-*-*-*-*-iso8859-*
xterm*font1: -*-ar pl shanheisun uni-*-*-17-*-*-*-*-*-p-*-iso10646-*
XTerm*background: white
XTerm*foreground: black
XTerm*pointerColor: red
@weakish
weakish / README.markdown
Created July 27, 2010 19:21
#encrypt /home /swap, put /tmp in RAM

Run the following command to encrypt the /dev/sdb1 partition:

sudo cryptsetup --verify-passphrase luksFormat /dev/sdb1 -c aes -s 256 -h sha256
sudo cryptsetup luksOpen /dev/sdb1 NAME

Now you can mkfs on /dev/mapper/NAME and mount/unmount it:

sudo mkfs -t ext3 -m 1 /dev/mapper/NAME
sudo mount /dev/mapper/NAME /mnt

sudo umount /mnt

@weakish
weakish / README.markdown
Created July 28, 2010 15:35
a #comic I made

The png file is generated with following commands:

ls *.svg | xargs -I {} basename '{}' .svg |
xargs -I '{}' inkscape -w310 -h205 -e '{}'.png '{}'.svg
montage heart_[1-6].png -border 1 -bordercolor black -geometry +5+10 \
-tile 2 heart.png

These SVG files are made by Jakukyo Friel weakish@gamil.com and licensed underGPL v2.

@weakish
weakish / stow_python
Created August 2, 2010 13:05
#stow #python programs on #debian #recycle
For python2.6 and debian:
python setup.py install --prefix /usr/local/stow/spam --install-layout=deb
But it may be a better idea to use virtualenv instead of stow.