Skip to content

Instantly share code, notes, and snippets.

View shelling's full-sized avatar

shelling shelling

View GitHub Profile
#!/usr/bin/env python
from mpi4py import MPI
import os
import numpy
import commands
Comm = MPI.COMM_WORLD
size = Comm.Get_size()
rank = Comm.Get_rank()
@shelling
shelling / alpaca.tex
Created June 17, 2010 06:22
Alpaca Book
\documentclass{book}
\usepackage{CJK}
\usepackage[margin=2cm]{geometry}
%% 這是一段註解
%% 連續的註解還不錯用
\begin{document}
\begin{CJK}{UTF8}{bsmi}
\title{Intermediate Perl}
\author{ 原著 Randal L. Schwartz, brian d foy \& Tom Phoenix 翻譯 shelling }
all: hello-plplot.c
gcc -o hello-plplot hello-plplot.c -std=c99 -lplplotd
clean:
rm -rf hello-plplot
@shelling
shelling / .gitignore
Created June 17, 2010 18:49
Book Skeleton of XeTeX
*.aux
*.log
*.pdf
*.toc
@shelling
shelling / main.tex
Created June 17, 2010 18:49
Paper Skeleton of XeTeX
\documentclass[11pt,a4paper]{article}
\usepackage{color}
\usepackage{fontspec}
\usepackage{xunicode}
\usepackage{xltxtra}
\usepackage[margin=2cm]{geometry}
\newfontfamily\msjh{Microsoft JhengHei}
@shelling
shelling / Makefile
Created August 9, 2010 06:28
Makefile for encoding multiple png image files into a short animation
files = *.png
fps = 30
.PHONY: all avi mp4 h264 help
all: avi mp4 h264
avi:
mencoder 'mf://$(files)' -mf type=png:fps=$(fps) -ovc lavc -lavcopts vcodec=wmv2 -o animation.avi
@shelling
shelling / example-preseed.txt
Created August 17, 2010 05:48
Debian Preseed Example
#### Contents of the preconfiguration file (for lenny)
### Localization
# Locale sets language and country.
d-i debian-installer/locale string en_US.UTF-8
# Keyboard selection.
#d-i console-tools/archs select at
d-i console-keymaps-at/keymap select us
# Example for a different keyboard architecture
#d-i console-keymaps-usb/keymap select mac-usb-us
\widetilde{E} = \sqrt{\frac{\epsilon_0}{\mu_0}}E
\widetilde{D} = \frac{1}{\sqrt{\epsilon_0\mu_0}}D
\frac{\partial E}{\partial t} = \frac{1}{\epsilon_r\epsilon_0}\nabla\times H - \frac{\sigma_E}{\epsilon_r\epsilon_0} E
@shelling
shelling / Makefile
Created October 20, 2010 11:50
Matlab launcher on Gnome
.PHONY: all
all:
mv matlab.png /usr/share/icons/hicolor/256x256/apps/
mv matlab.desktop /usr/share/applications/
echo alias matlab=\'matlab -nodisplay\' >> /etc/bash.bashrc
update-menus
@shelling
shelling / Makefile
Created October 27, 2010 14:49
customized gnome-terminal launcher
.PHONY: all
all:
cp gnome-terminal.desktop /usr/share/applications