Skip to content

Instantly share code, notes, and snippets.

View zrobit's full-sized avatar

zrobit ⚡️ zrobit

View GitHub Profile
@zrobit
zrobit / terminal-prompt-git-branch-zsh.md
Created June 26, 2022 12:43 — forked from reinvanoyen/terminal-prompt-git-branch-zsh.md
Add Git Branch Name to Terminal Prompt (MacOS Catalina zsh)

Add Git Branch Name to Terminal Prompt (MacOS Catalina zsh)

screenshot

Open ~/.zshrc in your favorite editor and add the following content to the bottom.

function parse_git_branch() {
    git branch 2> /dev/null | sed -n -e 's/^\* \(.*\)/[\1]/p'
}
@zrobit
zrobit / components.md
Created October 24, 2017 12:09 — forked from iclanzan/components.md
UI Component Name Ideas

UI component names

As front-end developers we all know the pain of coming up with meaningful component names for CSS classes. I created this gist as a place to collect terms that are suitable as user interface component names.

Please contribute your own ideas!

Interactive components

  • button
@zrobit
zrobit / after_res_hooks.js
Created January 31, 2017 15:20 — forked from pasupulaphani/after_res_hooks.js
Mongoose connection best practices
var db = mongoose.connect('mongodb://localhost:27017/DB');
// In middleware
app.use(function (req, res, next) {
// action after response
var afterResponse = function() {
logger.info({req: req}, "End request");
// any other clean ups