Skip to content

Instantly share code, notes, and snippets.

View dnadales's full-sized avatar

Damian Nadales dnadales

View GitHub Profile
@mitchwongho
mitchwongho / Docker
Last active November 29, 2023 06:36
Docker 'run' command to start an interactive BaSH session
# Assuming an Ubuntu Docker image
$ docker run -it <image> /bin/bash
@pmorie
pmorie / gist:8027518
Created December 18, 2013 18:41
bash -eu, explained
# Source: http://fvue.nl/wiki/Bash:_Error_handling
#
#!/bin/bash -eu
# -e: Exit immediately if a command exits with a non-zero status.
# -u: Treat unset variables as an error when substituting.
(false) # Caveat 1: If an error occurs in a subshell, it isn't detected
(false) || false # Solution: If you want to exit, you have to detect the error yourself
(false; true) || false # Caveat 2: The return status of the ';' separated list is `true'
(false && true) || false # Solution: If you want to control the last command executed, use `&&'
@killercup
killercup / pandoc.css
Created July 3, 2013 11:31
Add this to your Pandoc HTML documents using `--css pandoc.css` to make them look more awesome. (Tested with Markdown and LaTeX.)
/*
* I add this to html files generated with pandoc.
*/
html {
font-size: 100%;
overflow-y: scroll;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
}