Skip to content

Instantly share code, notes, and snippets.

Simon Ernst netmute

Block or report user

Report or block netmute

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@netmute
netmute / error_handler.sh
Created Oct 23, 2015
bash error handler
View error_handler.sh
#!/usr/bin/env bash
set -e
error_handler() {
local lineno="$1"
local message="$2"
if [[ -n "$message" ]]; then
echo "error on line $lineno: $message"
else
@netmute
netmute / spinner.sh
Last active Sep 3, 2015
a simple spinning animation for your shell scripts
View spinner.sh
#!/usr/bin/env bash
#
# a simple spinning animation for your shell scripts
# prints message in front of spinner
# - argument 1: the message to print
spinner_init() {
printf "$1 "
}
@netmute
netmute / config.fish
Last active May 26, 2019
My fish shell config
View config.fish
# disable fish greeting message
set fish_greeting
# configure fish git prompt
set __fish_git_prompt_showdirtystate 'true'
set __fish_git_prompt_showuntrackedfiles 'true'
set __fish_git_prompt_color_branch yellow
set __fish_git_prompt_char_dirtystate ''
set __fish_git_prompt_char_untrackedfiles '🆕 '
@netmute
netmute / gist:2689625
Created May 13, 2012
Run a loop at defined intervals on Arduino.
View gist:2689625
/* Run a loop at defined intervals.
This was tested with an Arduino Uno.
Other boards might require tweaking of the boardFrequency constant.
*/
/* How many times per second timedLoop() gets executed */
int loopFrequency = 1;
void timedLoop() {
/* Do stuff. */
@netmute
netmute / README.md
Last active Jul 28, 2019
Game of Life
View README.md

Game of Life

An implementation of Conway's Game of Life in 140 characters of Ruby.

Author

Created by Simon Ernst (@sier).

View .vimrc
" compatiblity with fish
set shell=/bin/sh
" setup vim-plug
call plug#begin('~/.vim/plugins')
" integration with external apps
Plug 'tpope/vim-fugitive'
Plug 'airblade/vim-gitgutter'
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': 'yes \| ./install' }
@netmute
netmute / Molokai.itermcolors
Created Dec 2, 2011
iTerm Molokai Colorscheme
View Molokai.itermcolors
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Blue Component</key>
<real>0.48771023750305176</real>
<key>Green Component</key>
<real>0.48781105875968933</real>
@netmute
netmute / Monokai.itermcolors
Created Dec 2, 2011
iTerm Monokai Colorscheme
View Monokai.itermcolors
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Blue Component</key>
<real>0.30093687772750854</real>
<key>Green Component</key>
<real>0.36639997363090515</real>
You can’t perform that action at this time.