Skip to content

Instantly share code, notes, and snippets.

View vanesa's full-sized avatar
☀️
Hope you're having a happy day!

Vanesa vanesa

☀️
Hope you're having a happy day!
View GitHub Profile
[alias]
pr = "!f() { git fetch origin pull/$1/head:sethvargo/pr-$1 && git checkout sethvargo/pr-$1; }; f"
unreleased = "!f() { git fetch --tags && git diff $(git tag | tail -n 1); }; f"
up = "!f() { git fetch --all; git pull origin HEAD; for upstream in $(git remote); do git remote prune "${upstream}"; done }; f"
graph = "!f() { git log --oneline --abbrev-commit --graph --decorate; }; f"
undo = !git reset HEAD~1 --mixed
amend = !git commit --amend --no-edit
top = !git log --format=format:%an | sort | uniq -c | sort -r | head -n 20
x = "!f() { gitx; }; f"
@petertwise
petertwise / addtogcal.php
Last active November 22, 2022 11:10
Function to create Add to Google Calendar link
<?php
/**
* Create a Google Calendar "add to calendar" link.
*
* This function is convienient because it does not require an API connection.
* Note that this only allows for adding a single event.
* The data does not have to exist already on any Google Calendar anywhere.
* This just adds your event data to the end-users GCal one item at a time.
* See https://stackoverflow.com/a/19867654/947370 for a full explaination of
* the Google Calendar URL structure.
@chrissimpkins
chrissimpkins / gist:5bf5686bae86b8129bee
Last active March 6, 2023 00:10
Atom Editor Cheat Sheet: macOS

Use these rapid keyboard shortcuts to control the GitHub Atom text editor on macOS.

Key to the Keys

  • ⌘ : Command key
  • ⌃ : Control key
  • ⌫ : Delete key
  • ← : Left arrow key
  • → : Right arrow key
  • ↑ : Up arrow key