Skip to content

Instantly share code, notes, and snippets.

View gregdeane's full-sized avatar

Greg Deane gregdeane

  • Berlin, Germany
  • 04:22 (UTC +02:00)
View GitHub Profile
@gregdeane
gregdeane / system.yuml.js
Last active February 25, 2017 13:42
Helper method to visually display SystemJS dependency relationships using http://yuml.me/
System.trace = true;
window.showModuleRelationships = function () {
var modules = Object.keys(System.loads)
.map(function (moduleName) {
return System.loads[moduleName];
});
function displayName(module) {
return module
.replace(System.baseURL, '')
@gregdeane
gregdeane / .bash_profile
Last active January 2, 2020 14:15
Machine setup
# standard aliases
alias www="cd ~/www"
alias gist="cd ~/www/gist"
# npm-related aliases
alias npmlist="npm list -g --depth=0"
# git-related aliases
alias recent='for k in `git branch | perl -pe s/^..//`; do echo -e `git show --pretty=format:"%Cgreen%ci %Cblue%cr%Creset" $k -- | head -n 1`\\t$k; done | sort -r | head'
alias listr="git for-each-ref refs/remotes/ --format='%(authorname) %(refname)' --sort=authorname"
@gregdeane
gregdeane / commit.md
Last active June 2, 2016 12:45
Git commit rules
@gregdeane
gregdeane / steps-to-autogenerate-changelog.md
Created February 4, 2016 13:57
Steps to auto-generate changelog
  1. Make changes
  2. Commit those changes
  3. Make sure Travis turns green
  4. Bump version in package.json
  5. conventionalChangelog
  6. Commit package.json and CHANGELOG.md files
  7. Tag
  8. Push

The reason why commit and tag should be run after conventionalChangelog is that the CHANGELOG should be included in the new release.

@gregdeane
gregdeane / bash-ps1.txt
Last active April 16, 2022 23:21
Customize BASH PS1 prompt to show current GIT repository and branch
# Customize BASH PS1 prompt to show current GIT repository and branch.
# by Mike Stewart - http://MediaDoneRight.com
# SETUP CONSTANTS
# Bunch-o-predefined colors. Makes reading code easier than escape sequences.
# I don't remember where I found this. o_O
__git_ps1 ()
{
local b="$(git symbolic-ref HEAD 2>/dev/null)";
@gregdeane
gregdeane / .bashrc
Last active October 15, 2016 14:19
JAVA_HOME=/usr/libexec/java_home
SCALA_HOME=/usr/local/opt/scala/idea
NPM_PACKAGES=/Users/[username]/.npm-packages
NODE_PATH="$NPM_PACKAGES/lib/node_modules:$NODE_PATH"
PATH="$NPM_PACKAGES/bin:$PATH:$SCALA_HOME:$JAVA_HOME"
@gregdeane
gregdeane / notes.md
Last active April 20, 2023 14:17
Downgrade iOS (iPhone)

Notes

Read these notes before proceeding

In order to downgrade to the previous major version (e.g. iOS 10 to iOS 9), important and regular action must be taken. For the downgrade to work, you must be proactive and prepare for a problem. Namely:

  • Archiving backups
  • Restoring the .ipsw file

Without regular attention to the two steps above, it may not be possible to truly downgrade the iOS version.

@gregdeane
gregdeane / ssh-known-hosts-mgmt.sh
Last active July 12, 2019 14:56 — forked from bradland/ssh-known-hosts-mgmt.sh
SSH known_hosts tools
# This is a short collection of tools that are useful for managing your
# known_hosts file. In this case, I'm using the '-f' flag to specify the
# global known_hosts file because I'll be adding many deploy users on this
# system. Simply omit the -f flag to operate on ~/.ssh/known_hosts
# Add entry for host
# ssh-keyscan -H github.com > /etc/ssh/ssh_known_hosts
ssh-keyscan -H github.com > ~/.ssh/known_hosts
# Scan known hosts
@gregdeane
gregdeane / parse.md
Last active October 7, 2016 09:57
Parse URL
/**
 * Return url split into its parts
 * If `key` is passed, return that part of the url
 * If `key` is passed but not found, return all of the parts
 *
 * Allowed keys: "url", "scheme", "host", "port", "path", "query", "hash"
 *
 * @param {string} url - Url to parse
 * @param {string} key - "url", "scheme", "host", "port", "path", "query", "hash"
@gregdeane
gregdeane / seating-specs.md
Last active October 12, 2016 12:31
How to sit at your desk

How to Sit at Your Desk

Seating Specs