Skip to content

Instantly share code, notes, and snippets.

@kornl
kornl / post-commit
Created January 7, 2016 07:54 — forked from rmflight/post-commit
useful commit hooks for R package dev
#!/path/2/Rscript
# License: CC0 (just be nice and point others to where you got this)
# Author: Robert M Flight <[email protected]>, github.com/rmflight
#
# This is a post-commit hook that after a successful commit subsequently increments the package version in DESCRIPTION
# and commits that. Analogous to the pre-commit at https://gist.github.com/rmflight/8863882, but useful if you only have
# good reasons for not doing it on the pre-commit.
#
# To install it, simply copy this into the ".git/hooks/post-commit" file of your git repo, change /path/2/Rscript, and make
@kornl
kornl / convert_video_for_html_5.sh
Created November 2, 2013 19:53
Uses ffmpeg to convert a video to Ogg/Theora, WebM/vp8 and MP4/h264 for web page inclusion using HTML 5.
#!/bin/bash
#
# First parameter is the file to convert, second optional parameter is the bitrate (default=2000k).
#
# This is the HTML 5 code for including the videos:
# <video width="450" controls>
# <source src="example.ogv" type="video/ogg; codecs=theora,vorbis">
# <source src="example.webm" type="video/webm">
# <source src="example.mp4" type="video/mp4">
# </video>