Skip to content

Instantly share code, notes, and snippets.

View agarzola's full-sized avatar
:shipit:
Ship the shipping shippers.

Alfonso Gómez-Arzola agarzola

:shipit:
Ship the shipping shippers.
View GitHub Profile
@agarzola
agarzola / gist:45bb1f3161fee3e9768bcf029401eddb
Created January 30, 2017 22:57 — forked from anonymous/gist:b9dab8b40252ba9d090fd8629af8aab8
Crockpot Caramelized Pork Ramen Noodle Soup w/Curry Roasted Acorn Squash
*
yields: 4 BOWLS OF SOUP + EXTRA PORK serving size:
*
* preparation time: 25 MINUTES
*
* cook time: 7 HOURS
*
* total time: 7 HOURS 25 MINUTES
@agarzola
agarzola / lastpass_shortcuts.sh
Last active March 5, 2017 13:03
Shortcuts to my most used lpass commands
function lastpass () {
if [ "$1" ]; then
if [ "$2" ]; then
if [ "$1" = "all" ] || [ "$1" = "password" ] || [ "$1" = "username" ] || [ "$1" = "url" ] || [ "$1" = "notes" ]; then
requested_part="$1"
else
requested_part="field=$1"
fi
requested_account="$2"
else
@agarzola
agarzola / git-prompt.plugin.zsh
Last active August 24, 2018 03:16
My zsh theme and git-prompt overrides
# ZSH Git Prompt Plugin from:
# http://github.com/olivierverdier/zsh-git-prompt
__GIT_PROMPT_DIR="${0:A:h}"
## Hook function definitions
function chpwd_update_git_vars() {
update_current_git_vars
}
@agarzola
agarzola / directory-and-git-state.sh
Last active October 7, 2018 20:20 — forked from mcjim/.bashrc
Git branch, dirty and stash state in Bash prompt.
# Tweak presentation and add commits ahead/behind.
# Quick fork by @mcjim to add stash status and tweak to suit his style.
# http://henrik.nyh.se/2008/12/git-dirty-prompt
# http://www.simplisticcomplexity.com/2008/03/13/show-your-git-branch-name-in-your-prompt/
# host dir master $ # clean working directory
# host dir master* $ # dirty working directory
# host dir master*^ $ # dirty working directory with stash
# host dir master^ $ # clean working directory with stash
function parse_git_dirty {
@agarzola
agarzola / find-elements-off-right-side.js
Created March 8, 2024 15:50
Find elements rendered off the right side of the viewport
// Copy the code below, paste it into the browser console, and press enter. It
// will return an array of elements rendered off the right side of the viewport.
Array.from(document.querySelectorAll('*')).reduce((results, element) => {
const rect = element.getBoundingClientRect();
if ((rect.width + rect.left) > window.innerWidth) results.push(element);
return results;
}, []);