Skip to content

Instantly share code, notes, and snippets.

View jdiaz5513's full-sized avatar

Julián Díaz jdiaz5513

View GitHub Profile
jdiaz5513 /
Created September 6, 2023 23:02
Git Shortcuts (Fish Shell)
abbr ga "git add"
abbr gaa "git add --all"
abbr "gbc!" "git for-each-ref --format '%(refname:short) %(upstream:track)' | awk '$2 == \"[gone]\" {print $1}' | xargs -r git branch -D"
abbr gbd "git branch -D"
abbr gbl "git branch -l"
abbr gbm "git branch -m"
abbr "gc!" "git commit --amend"
abbr gca "git commit --all"
abbr "gca!" "git commit --all --amend"
abbr gcam "git commit --all -m"
jdiaz5513 /
Created August 6, 2019 01:11
Git Abbreviations for Fish
abbr -a -U -- ga 'git add'
abbr -a -U -- gaa 'git add --all'
abbr -a -U -- gbd 'git branch -d'
abbr -a -U -- gbl 'git branch -l'
abbr -a -U -- gbm 'git branch -m'
abbr -a -U -- gc 'git commit'
abbr -a -U -- gc! 'git commit --amend'
abbr -a -U -- gcam 'git commit --all -m'
abbr -a -U -- gcan! 'git commit --all --no-edit --amend'
abbr -a -U -- gcb 'git checkout -b'

Keybase proof

I hereby claim:

  • I am jdiaz5513 on github.
  • I am jdiaz5513 ( on keybase.
  • I have a public key ASDc_tiOI-PkxN6yA8EOVDwXCxf-W9JYXBfiT020QlAaBQo

To claim this, I am signing this object:

jdiaz5513 / ampersand-link-collection-state.js
Created January 16, 2015 18:24
Linked collection state for ampersand-state
from god import god_module
print 'done.'
jdiaz5513 /
Last active December 30, 2023 02:32
Console ASCII Art Generator
#! /usr/bin/env python2
# Requires: PIL, colormath
# Improved algorithm now automatically crops the image and uses much
# better color matching
from PIL import Image, ImageChops
from colormath.color_conversions import convert_color
from colormath.color_objects import LabColor
from colormath.color_objects import sRGBColor as RGBColor
jdiaz5513 /
Last active August 29, 2015 13:56
versioning and automatic migration for ndb.Model on Google App Engine
# Article for this code:
# NOTE: mapreduce.operation.ndb is not part of the mapreduce library shipped with App Engine.
# See here for an implementation:
from google.appengine.ext import ndb
class VersionedModel(ndb.Model):
new_property = ndb.StringProperty()
jdiaz5513 /
Created February 10, 2014 07:48
mapreduce.operations.ndb - helper for Google App Engine MapReduce NDB operations
"""NDB-related operations."""
__all__ = ['Put', 'Delete']
from mapreduce.operation import base
# pylint: disable=protected-access
jdiaz5513 /
Last active December 2, 2016 12:36
A script for Google App Engine remote_api shell that automatically creates a connection and drops you to the shell. I created this script for people who use the remote_api shell a lot; it saves me a lot of time. The best part is, it works with alternative Python shells like iPython!
This script automates the task of connecting to a running App Engine server,
whether it's a local dev_appserver or a live app.
If PyQt4 is installed, it will ask for credentials inside a dialog box
instead of prompting in the terminal. This is good for shells that do
not support getpass (iPython).
It will automatically add an import path for a local virtualenv in the app