Skip to content

Instantly share code, notes, and snippets.

View leoz's full-sized avatar
🥎

Leonid Zolotarev leoz

🥎
View GitHub Profile
/*
Extended Angular logging
Author: Rob Anderson (@iotaweb)
Adds ability to turn on/off all logging messages
Adds abiity to specify logging levels
Adds support for console.table()
Adds support for using controller name (or alias) as context
Prepends logs with timestamp (nicely padded)
Doesn't mess with array (preserves nascent string substitution), e.g. $log.info('This is a %s', message)
Nicely formatted for easy reading (context padded to consistent width [optional])
@leoz
leoz / git_rebase.md
Created February 2, 2019 17:35 — forked from ravibhure/git_rebase.md
Git rebase from remote fork repo

In your local clone of your forked repository, you can add the original GitHub repository as a "remote". ("Remotes" are like nicknames for the URLs of repositories - origin is one, for example.) Then you can fetch all the branches from that upstream repository, and rebase your work to continue working on the upstream version. In terms of commands that might look like:

Add the remote, call it "upstream":

git remote add upstream https://github.com/whoever/whatever.git

Fetch all the branches of that remote into remote-tracking branches, such as upstream/master:

git fetch upstream