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/zsh | |
dir1="$1" | |
dir2="$2" | |
if [ ! -d "$dir1" ]; then | |
echo "Directory $dir1 does not exist." | |
exit 2 | |
fi | |
if [ ! -d "$dir2" ]; then |
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
#!/usr/bin/env bash | |
if [[ "$1" == "-g" ]]; then | |
GEOMETRY="$2" | |
shift 2 | |
fi | |
for f in "$@"; do | |
convert "$f" -geometry ${GEOMETRY:=800x480} sixel:- | |
done |
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
R_LIBS_USER="~/.local/lib/R/library" |
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
;;; init.el -*- lexical-binding: t; -*- | |
(if (fboundp 'tool-bar-mode) (tool-bar-mode -1)) | |
(if (fboundp 'menu-bar-mode) (menu-bar-mode -1)) | |
(if (fboundp 'scroll-bar-mode) (scroll-bar-mode -1)) | |
(setq-default inhibit-startup-screen t | |
initial-scratch-message "" | |
select-enable-clipboard t | |
custom-file "~/.emacs.d/custom.el") |
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
https://github.com/eliben/4clojure-solutions.git | |
https://github.com/bcc32/99.git | |
https://github.com/politrons/Dive_into_Haskell.git | |
https://github.com/hbctraining/Intro-to-R.git | |
https://github.com/ppham27/MLaPP-solutions.git | |
https://github.com/ArthurZC23/Machine-Learning-A-Probabilistic-Perspective-Solutions.git | |
https://github.com/nayuki/Nayuki-web-published-code.git | |
https://github.com/davidemms/OrthoFinder.git | |
https://github.com/ctgk/PRML.git | |
https://github.com/wentaocn/Programming-in-Haskell.git |
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
# Time-stamp: <2010-04-05 17:11:20 chl> | |
# | |
# Automaticaly collate R file and try to build a package with | |
# documentation generated by Roxygen. | |
# | |
require(roxygen) | |
rm(list=ls()) | |
package.skeleton('rocad',code_files=c('rocad.R','rocad-package.R'),force=T) | |
roxygenize('rocad',roxygen.dir='rocad',copy.package=F,unlink.target=F) | |
try(system("R CMD build rocad")) |
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
#!/usr/bin/env bash | |
# Note: pdftoppm has page range so the first line is probably not necessary. | |
f="/tmp/tmp.$RANDOM" | |
pdftk "$1" cat $2 output $f | |
pdfcrop $f $f.crop | |
pdftoppm -png -rx 300 -ry 300 $f.crop $HOME/"$1".png | |
rm $f $f.crop |
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
#!/usr/bin/env python3 | |
import os | |
import statistics | |
import sys | |
from Bio import SeqIO | |
term_width = os.get_terminal_size().columns | |
term_height = os.get_terminal_size().lines | |
id_width = 15 |
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
;;; org-babel.el --- default settings for org->pdf compilation | |
;;; | |
;;; Commentary: | |
;;; This is very basic stuff. | |
;;; | |
;;; Code: | |
(require 'org) | |
(add-to-list 'load-path "/home/chl/Documents/notes") | |
(require 'ox-bibtex) |
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
command! -range Gist call system('gist', getbufline('%', <line1>, <line2>)) | |
command! -bang -nargs=* History | |
\ call fzf#vim#history({'options': '--no-sort'}) |
NewerOlder