Skip to content

Instantly share code, notes, and snippets.

View mayatron's full-sized avatar

Jeremy M. Taylor mayatron

  • San Francisco, CA
View GitHub Profile
@davidteren
davidteren / nerd_fonts.md
Last active November 13, 2024 19:26
Install Nerd Fonts via Homebrew [updated & fixed]
@jordpo
jordpo / route-action.js
Last active February 1, 2019 05:42
A route-action helper to expose current route handling
import Helper from '@ember/component/helper';
import { inject as service } from '@ember-decorators/service';
import { bind } from '@ember/runloop';
import { getOwner } from '@ember/application';
function findHandler(owner, currentRouteInfo, action) {
const route = owner.lookup(`route:${currentRouteInfo.name}`);
const handler = route.actions ? route.actions[action] : route[action];
if (!handler && currentRouteInfo.parent) {
return findHandler(owner, currentRouteInfo.parent, action);
@mobilemind
mobilemind / git-tag-delete-local-and-remote.sh
Last active November 2, 2024 08:30
how to delete a git tag locally and remote
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName
@gnarf
gnarf / ..git-pr.md
Last active October 17, 2024 18:48
git pr - Global .gitconfig aliases for Pull Request Managment

Install

Either copy the aliases from the .gitconfig or run the commands in add-pr-alias.sh

Usage

Easily checkout local copies of pull requests from remotes:

  • git pr 4 - creates local branch pr/4 from the github upstream(if it exists) or origin remote and checks it out
  • git pr 4 someremote - creates local branch pr/4 from someremote remote and checks it out
@jasonrudolph
jasonrudolph / git-branches-by-commit-date.sh
Created February 12, 2012 20:40
List remote Git branches and the last commit date for each branch. Sort by most recent commit date.
# Credit http://stackoverflow.com/a/2514279
for branch in `git branch -r | grep -v HEAD`;do echo -e `git show --format="%ci %cr" $branch | head -n 1` \\t$branch; done | sort -r