This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
watch: | |
while true; do \ | |
make all; \ | |
inotifywait -qre close_write .; \ | |
done | |
# Then you can use make watch run `make all` once file in . changed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\usepackage{verbatim} | |
\makeatletter | |
\newwrite\Code@out | |
\newcommand\python{\obeylines\expandafter\pythonArg\noexpand} | |
\newcommand\pythonArg[1][tmp.py.in]{% | |
\gdef\FNameIn{#1} | |
\gdef\FNameOut{tmp.py.out} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Author: tim.tang | |
rm -f changelog.md | |
git for-each-ref --sort='*authordate' --format='%(tag)' refs/tags | grep -v '^$' | tail -r | while read TAG ; do | |
echo | |
if [ $NEXT ];then | |
echo ' ' >> changelog.md | |
echo *$NEXT* >> changelog.md | |
echo '---' >> changelog.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This file has been auto-generated by i3-config-wizard(1). | |
# It will not be overwritten, so edit it as you like. | |
# | |
# Should you change your keyboard layout somewhen, delete | |
# this file and re-run i3-config-wizard(1). | |
# | |
# i3 config file (v4) | |
# | |
# Please see http://i3wm.org/docs/userguide.html for a complete reference! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get install build-essential libx11-dev libxpm-dev libjpeg-dev libpng-dev libgif-dev libtiff-dev libgtk2.0-dev libncurses-dev libgtk-3-dev libxaw3dxft6 librsvg2-dev imagemagick libgpm-dev libdbus-1-dev libgconf-2-4 libxml2-dev libgnutls28-dev libm17n-dev libotf-dev -y | |
./configure --without-makeinfo --with-x-toolkit=lucid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Our own header, to be included before all standard system headers */ | |
#ifndef _APUE_H | |
#define _APUE_H | |
#if defined(SOLARIS) | |
#define _XOPEN_SOURCE 500 /* Single UNIX Specification, Version 2 for Solaris 9 */ | |
#define CMSG_LEN(x) _CMSG_DATA_ALIGN(sizeof(struct cmsghdr)+(x)) | |
#elif !defined(BSD) | |
#define _XOPEN_SOURCE 600 /* Single UNIX Specification, Version 3 */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
class ExceptionHook: | |
instance = None | |
def __call__(self, *args, **kwargs): | |
if self.instance is None: | |
from IPython.core import ultratb | |
self.instance = ultratb.FormattedTB(mode='Plain', | |
color_scheme='Linux', call_pdb=1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extra_dirs = ['./'] | |
extra_files = extra_dirs[:] | |
for extra_dir in extra_dirs: | |
for dirname, dirs, files in os.walk(extra_dir): | |
for filename in files: | |
filename = os.path.join(dirname, filename) | |
if os.path.isfile(filename) and os.path.splitext(filename)[1] in ['.py', '.html', '.js']: | |
extra_files.append(filename) | |
if __name__ == '__main__': |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun my-org-screenshot () | |
"Take a screenshot into a time stamped unique-named file in the | |
same directory as the org-buffer and insert a link to this file." | |
(interactive) | |
(setq filename | |
(concat | |
(make-temp-name | |
(concat | |
"art/" | |
(buffer-name) |
OlderNewer