Skip to content

Instantly share code, notes, and snippets.

View nachoparker's full-sized avatar

nachoparker nachoparker

View GitHub Profile
@nachoparker
nachoparker / picec.sh
Created February 2, 2017 07:02
Control your Raspberry Pi using your TV remote
#!/bin/bash
# Simple script to control your Raspberry Pi with your TV remote using libcec
#
# Copyleft 2017 by Ignacio Nunez Hernanz <nacho _a_t_ ownyourbits _d_o_t_ com>
# GPL licensed (see end of file) * Use at your own risk!
#
# You can set this to be run in your desktop "startup programs", or
# at the last line of /etc/rc.local, just to say a couple options
#
@nachoparker
nachoparker / tab_list_files_zsh.sh
Last active July 7, 2021 15:45
List files without stopping to type in zsh
# List files in zsh with <TAB>
#
# Copyleft 2017 by Ignacio Nunez Hernanz <nacho _a_t_ ownyourbits _d_o_t_ com>
# GPL licensed (see end of file) * Use at your own risk!
#
# Usage:
# In the middle of the command line:
# (command being typed)<TAB>(resume typing)
#
# At the beginning of the command line:
@nachoparker
nachoparker / xcol_bash.sh
Last active December 28, 2017 16:47
colorize your stdout with xcol for bash
#!/bin/bash
# Simple colorize for bash by means of sed
#
# Copyright 2008-2015 by Andreas Schamanek <andreas@schamanek.net>
#
# 2017 - Modified from mycolorize into a shell function
# by Ignacio Nunez Hernanz <nacho _a_t_ ownyourbits _d_o_t_ com>
#
# GPL licensed (see end of file) * Use at your own risk!
#
@nachoparker
nachoparker / xcol_zsh.sh
Last active October 9, 2020 22:52
colorize your stdout with xcol for zsh
#!/bin/zsh
# Simple colorize for bash by means of sed
#
# Copyright 2008-2015 by Andreas Schamanek <andreas@schamanek.net>
#
# 2017 - Modified from mycolorize into a shell function
# by Ignacio Nunez Hernanz <nacho _a_t_ ownyourbits _d_o_t_ com>
#
# GPL licensed (see end of file) * Use at your own risk!
#
@nachoparker
nachoparker / git-forget-blob.sh
Last active September 8, 2021 18:34
Completely remove a file from a git repository with git-forget-blob
#!/bin/bash
# Completely remove a file from a git repository history
#
# Copyleft 2017 by Ignacio Nunez Hernanz <nacho _a_t_ ownyourbits _d_o_t_ com>
# GPL licensed (see end of file) * Use at your own risk!
#
# Usage:
# git-forget-blob file_to_forget
#
# Notes:
@nachoparker
nachoparker / start_tmux
Last active January 20, 2017 18:07
Smart tmux sessions with start_tmux
# Simple, convenient way of starting and restoring tmux sessions
#
# Copyleft 2017 by Ignacio Nunez Hernanz <nacho _a_t_ ownyourbits _d_o_t_ com>
# GPL licensed (see end of file) * Use at your own risk!
#
# I source this function as part of my .bashrc or .zshrc (actually I do 'source .zsh_library.sh')
# I normally also run 'start_tmux' at the end of my .bashrc or .zshrc in all my servers
#
# Usage:
# start_tmux # instead of just 'tmux'