Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
# Set a Bash prompt that includes the exit code of the last executed command. | |
# | |
# Setup: paste the content of this file to ~/.bashrc, or source this file from | |
# ~/.bashrc (make sure ~/.bashrc is sourced by ~/.bash_profile or ~/.profile) | |
# | |
# Daniel Weibel <[email protected]> October 2015 | |
#------------------------------------------------------------------------------# | |
# Command that Bash executes just before displaying a prompt | |
export PROMPT_COMMAND=set_prompt |
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 | |
# | |
# Print sequence of dates in one-week intervals, starting from an initial date. | |
# | |
# Daniel Weibel <[email protected]> October 2015 | |
#------------------------------------------------------------------------------# | |
set -e | |
help() { |
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
% setCrop - Adjust paper size to figure size of current figure. | |
% | |
% Usage: | |
% setCrop() | |
% | |
% Notes: | |
% Call this function after all plotting commands, after calling | |
% "setTightMargins", but before calling "print". | |
% | |
% Daniel Weibel <[email protected]> November 2015 |
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
% Remove superfluous margins from current figure. This means that the figure | |
% borders will be directly adjacent to the outermost figure parts, e.g. axis | |
% labels, or title. | |
% | |
% The optional argument 'mrg' allows to specify a custom margin in centimeters. | |
% It must be either a single value, or a vector "[left bottom top right]". | |
% | |
% Call this function after creating the plot, before calling 'setCrop', | |
% and before calling 'print'. | |
% |
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 | |
# | |
# Compile a C program for Nexus 6 (or other device with an ARM 32-bit processor) | |
# | |
# Requirements: | |
# - Android NDK | |
# | |
# Daniel Weibel <[email protected]> January 2016 | |
#------------------------------------------------------------------------------# |
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
% LaTeX class for simple short (or long) notes | |
% | |
% Usage: place .cls file in same directory as .tex file and reference class | |
% in .tex file with: \documentclass{note} | |
% | |
% Daniel Weibel <[email protected]> May 2016 | |
%------------------------------------------------------------------------------% | |
\LoadClass[a4paper]{article} |
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
% Begin of manually added comments | |
%------------------------------------------------------------------------------% | |
% | |
% The main characteristics of this bib style are: | |
% - Ordering of references in citation order | |
% - Author names: initials + surname (e.g. J. F. Smith) | |
% - Maximum three authors (missing names replaced by et al.) | |
% - Date as month + year | |
% - Titles (and punctuation) in double quotes | |
% - Don't change capitalisation of titles |
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
% Begin of manually added comments | |
%------------------------------------------------------------------------------% | |
% | |
% The main characteristics of this bib style are: | |
% - Ordering of references in alphabetical order | |
% - Author names: initials + surname (e.g. J. F. Smith) | |
% - Maximum three authors (missing names replaced by et al.) | |
% - Date as month + year | |
% - Titles (and punctuation) in double quotes | |
% - Don't change capitalisation of titles |
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
# Usage: ruby heroku_names.rb | |
def adjectives | |
[ | |
"autumn", "hidden", "bitter", "misty", "silent", "empty", "dry", "dark", | |
"summer", "icy", "delicate", "quiet", "white", "cool", "spring", "winter", | |
"patient", "crimson", "wispy", "weathered", "blue", | |
"billowing", "broken", "cold", "damp", "falling", "frosty", "green", | |
"long", "late", "bold", "little", "morning", "muddy", | |
"red", "rough", "still", "small", "sparkling", "shy", |
OlderNewer