Skip to content

Instantly share code, notes, and snippets.

# migrating from https://github.com/robbyrussell/oh-my-zsh/blob/master/plugins/git/git.plugin.zsh
# Aliases
alias g='git'
#compdef g=git
alias gst='git status'
#compdef _git gst=git-status
alias gd='git diff'
#compdef _git gd=git-diff
alias gdc='git diff --cached'
@googya
googya / gist:073123621ac4066659a0d0fb1c92ef03
Created June 19, 2018 16:30 — forked from giannisp/gist:ebaca117ac9e44231421f04e7796d5ca
Upgrade PostgreSQL 9.6.5 to 10.0 using Homebrew (macOS)
After automatically updating Postgres to 10.0 via Homebrew, the pg_ctl start command didn't work.
The error was "The data directory was initialized by PostgreSQL version 9.6, which is not compatible with this version 10.0."
Database files have to be updated before starting the server, here are the steps that had to be followed:
# need to have both 9.6.x and latest 10.0 installed, and keep 10.0 as default
brew unlink postgresql
brew install postgresql@9.6
brew unlink postgresql@9.6
brew link postgresql
@googya
googya / dabblet.css
Created April 26, 2018 03:11 — forked from csssecrets/dabblet.css
Translucent borders
/**
* Translucent borders
*/
body {
background: url('http://csssecrets.io/images/stone-art.jpg');
}
div {
border: 10px solid hsla(0,0%,100%,.5);

Redux higher order components

Sometimes we need to share props and behaviour between multiple components/containers. For that we can do a higher order component. Example:

Decorator component

Higher Order Component that will decorate other component:

@googya
googya / Redux-React-Counter-Example
Created July 19, 2017 06:46 — forked from rjmacarthy/Redux-React-Counter-Example
Redux and React Simple JSBIN
https://jsbin.com/debohu/1/edit?html,js,output
@googya
googya / gist:d8af34d9fd5f71e5d95b63aeed7aba7b
Created July 13, 2017 07:24 — forked from mxpv/gist:5262043
Git caret and tilde
http://paulboxley.com/blog/2011/06/git-caret-and-tilde
http://alblue.bandlem.com/2011/05/git-tip-of-week-git-revisions.html
@googya
googya / web-servers.md
Created May 16, 2017 06:32 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@googya
googya / introrx.md
Created April 6, 2017 14:23 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@googya
googya / RxJS 5 Operators By Example.md
Created April 6, 2017 14:08 — forked from lyyourc/RxJS 5 Operators By Example.md
「译」RxJS 5 Operators By Example
@googya
googya / RxJS 5 Operators By Example.md
Created April 6, 2017 14:08 — forked from lyyourc/RxJS 5 Operators By Example.md
「译」RxJS 5 Operators By Example