Skip to content

Instantly share code, notes, and snippets.

View hsigrist's full-sized avatar
👽
Cofusing

Hans Sigrist hsigrist

👽
Cofusing
View GitHub Profile
@gillescastel
gillescastel / Phd workflow.md
Last active August 24, 2025 02:48
Phd Workflow

Directory structure:

.
├── papers
│   ├── Title - Author.pdf
│   └── Title - Author.pdf
├── notes
│   ├── 2022-04-10
│   │   ├── note.tex
@pachadotdev
pachadotdev / r_ubuntu_17_10.sh
Last active June 25, 2019 05:43
Install R on Ubuntu 17.10
# Install R
sudo apt-get update
sudo apt-get install gdebi libxml2-dev libssl-dev libcurl4-openssl-dev libopenblas-dev r-base r-base-dev
# Install RStudio
cd ~/Downloads
wget https://download1.rstudio.org/rstudio-xenial-1.1.383-amd64.deb
sudo gdebi rstudio-xenial-1.1.383-amd64.deb
printf '\nexport QT_STYLE_OVERRIDE=gtk\n' | sudo tee -a ~/.profile
@hsigrist
hsigrist / .emacs
Created January 23, 2016 06:14 — forked from even4void/.emacs
A basic previewer for R Markdown files edited with Emacs
(add-to-list 'auto-mode-alist '("\\.md\\'" . markdown-mode))
(add-to-list 'auto-mode-alist '("\\.Rmd\\'" . markdown-mode))
(add-to-list 'auto-mode-alist '("\\.rmd\\'" . markdown-mode))
(add-hook 'markdown-mode-hook 'turn-on-outline-minor-mode)
(defun rmarkdown-new-chunk (name)
"Insert a new R chunk."
(interactive "sChunk name: ")
(insert "\n```{r " name "}\n")
(save-excursion
(setq package-archives '(("gnu" . "http://elpa.gnu.org/packages/")
;;("marmalade" . "http://marmalade-repo.org/packages/")
("melpa" . "http://melpa.milkbox.net/packages/")))
(package-initialize)
;; AucTeX fix PATH & XeLaTeX fix
(setenv "PATH" "/usr/local/bin:/Library/TeX/texbin/:$PATH" t)
(setq org-latex-pdf-process '("latexmk -pdflatex='xelatex -synctex=1 --shell-escape' -pdf %f"))

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@lmullen
lmullen / Makefile
Last active June 11, 2025 22:04
PDF slides and handouts using Pandoc and Beamer
SLIDES := $(patsubst %.md,%.md.slides.pdf,$(wildcard *.md))
HANDOUTS := $(patsubst %.md,%.md.handout.pdf,$(wildcard *.md))
all : $(SLIDES) $(HANDOUTS)
%.md.slides.pdf : %.md
pandoc $^ -t beamer --slide-level 2 -o $@
%.md.handout.pdf : %.md
pandoc $^ -t beamer --slide-level 2 -V handout -o $@
@hsigrist
hsigrist / talk.sublime-snippet
Created January 2, 2014 13:30
HyTeX Beamer Talk
<snippet>
<content><![CDATA[
% ${1:nombre_archivo}.tex -- HyTeX Beamer Talk
% Hans Sigrist/${2:date}, ${3:time}.
%______________________________________________________________________________
% GNU Free Documentation License
% Copyright (c) 2014 Hans Sigrist
% Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. A copy of the license is included in the section entitled "GNU Free Documentation License".THER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
% Read at <http://hsigrist.tumlr.com/GNU_License> This work consists of the files ${1:nombre_archivo}.tex and the derived file ${1:nombre_archivo}.pdf.
%___________________________
@hsigrist
hsigrist / memoir.sublime-snippet
Created January 2, 2014 13:25
Oficio Memoir Article
<snippet>
<content><![CDATA[
% ${1:nombre_archivo}.tex -- Oficio Memoir Article
% Hans Sigrist/${2:date}, ${3:time}.
%______________________________________________________________________________
% GNU Free Documentation License
% Copyright (c) 2014 Hans Sigrist
% Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. A copy of the license is included in the section entitled "GNU Free Documentation License".THER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
% Read at <http://hsigrist.tumlr.com/GNU_License> This work consists of the files ${1:nombre_archivo}.tex and the derived file ${1:nombre_archivo}.pdf.
%_______________________
@rosswd
rosswd / multi-git-win.md
Last active November 19, 2025 00:02
Setting up a Github and Bitbucket account on the same computer on Mac OS. Now with a guide for Windows 10.

Setting up github and bitbucket on the same computer (Windows)

Guide for Windows

mix3d asked for some help using this guide with windows so here we go. This was tested with Windows 10. Run all commands in Git Bash once it's installed.

Github will be the main account and bitbucket the secondary.

Git for Windows

  • Download and install Git for Windows
    • In the installer, select everything but decide if you want a desktop icon (2nd step)