Skip to content

Instantly share code, notes, and snippets.

@dustincys
dustincys / screen.sh
Created February 22, 2014 07:12
my double screens' resolution configuration
xrandr --newmode "1440x900_60.00" 106.50 1440 1528 1672 1904 900 903 909 934 -hsync +vsync
xrandr --addmode DVI-0 "1440x900_60.00"
xrandr --output DVI-0 --mode "1440x900_60.00"
xrandr --output DVI-1 --mode "1920x1080"
xrandr --output DVI-0 --right-of DVI-1
@dustincys
dustincys / paper.tex
Created January 21, 2014 08:53
中文文章XeLaTeX模板
%!Tex Program = xelatex
% -*-coding: utf-8 -*-
\documentclass[twocolumn]{article}
\usepackage[a4paper,text={180true mm,240true mm}]{geometry}
%\usepackage[a4paper,text={150true mm,224true mm},top=35.5true mm,left=30true mm,head=5true mm,headsep=2.5true mm,foot=8.5true mm]{geometry}
\usepackage[BoldFont,SlantFont]{xeCJK}
\usepackage{amsmath,latexsym,amssymb,amsfonts,amsbsy}
\usepackage{multirow} %使用Multirow宏包,使得表格可以合并多个row 格
\usepackage{booktabs} % 表格,横的粗线;\specialrule{1pt}{0pt}{0pt}
color.bar <- function(
lut, min, max=-min, nticks=11,
ticks=seq(min, max, len=nticks), title='',cexv=0.5
)
{
min<-as.integer(min);
max<-as.integer(max)+1;
scale = (length(lut)-1)/(max-min)
#dev.new(width=1.75, height=5)
# Conky settings #
background no
update_interval 1
cpu_avg_samples 2
net_avg_samples 2
override_utf8_locale yes
double_buffer yes
@dustincys
dustincys / duoshuo.css
Created January 17, 2014 10:50
css configuration of duoshuo
#ds-thread .ds-powered-by{display:none!important;}
#ds-reset .ds-avatar img{
-webkit-border-radius: 0px;
border-radius: 0px;
}
#ds-thread #ds-reset .ds-user-name {
font-size: 16px;
line-height: 20px;
}
#ds-thread #ds-reset .ds-comment-body p {
@dustincys
dustincys / article-style.css
Last active January 3, 2016 13:48
css for goldendict
body{
color:#b08d58;
background:black;
}
.dsl_m1 {
font-family: Agency FB;
font-weight: bold;
color: #FF33FF;
font-size: 22px;
}
autocmd BufRead,BufNewFile *.\(md\|mdown\|markdown\) set filetype=markdown
@dustincys
dustincys / .vimrc
Last active January 3, 2016 13:39
.vimrc
" Set color of terminal
if has ('gui_running')
else
set term=builtin_xterm
set term=xterm-256color
endif
set t_Co=256
"set path of plugin
set runtimepath+=~/.vim/l9
@dustincys
dustincys / markdown.snippets
Last active January 3, 2016 08:19
jekyll blog snippet of Ultisnip in vim
###########################################################################
# SNIPPETS for MARKDOWN #
###########################################################################
###########################
# Sections and Paragraphs #
###########################
snippet sec "Section" b
# ${1:Section Name} #
$0
@dustincys
dustincys / newpost.sh
Last active January 3, 2016 08:19
shell script of creat new jekyll blog file, automatically change the tags to lowercase
#!/bin/bash
vim `date +%Y-%m-%d-$@.md`;
sed -i -e 's/\(tags\s*:\)\(.*\)/\1\L\2/g' `date +%Y-%m-%d-$@.md`;