Skip to content

Instantly share code, notes, and snippets.

@mjlescano
mjlescano / retry
Last active August 29, 2015 14:20 — forked from dansimau/gist:842415
Bash function for running a command, checking the return code, and re-trying it `x` times after `y` sleep seconds.
#!/bin/bash
# Usage:
# retry <commands...>
# retry <retry times> <commands...>
# retry <retry times> <retry wait> <commands...>
if [[ $2 =~ ^-?[0-9]+$ ]]; then
cmd="${@:3}"
retry_times=$1
@mjlescano
mjlescano / form-reset-helpers.scss
Last active November 30, 2022 16:08 — forked from anthonyshort/Super Form Reset.css
Reset for form elements written in SCSS
/* ----------------------------------------------------------------------------------------------------
SCSS Form Reset Helpers - Forked from: https://gist.github.com/anthonyshort/552543
Intended usage:
- MIXINS: for very specific use cases, when you dont want to reset absolutly all the forms, very verbose output.
- PLACEHOLDER SELECTORS: use as extending classes. Less verbose, more generic overrides.
A couple of things to watch out for: