Skip to content

Instantly share code, notes, and snippets.

@Thiruppathi
Thiruppathi / .bash_profile
Last active July 24, 2018 17:56
.bash_profile
export JAVA_HOME=$(/usr/libexec/java_home)
export PATH=$PATH:/Users/thiru/npm/bin
export PATH=$PATH:/Users/thiru/apps/mongodb/bin
export PATH="$PATH:$HOME/.yarn/bin"
export GOPATH=$HOME/go
export PATH=/Users/thiru/apps/phantomjs-2.1.1-macosx/bin:$PATH
export NVM_DIR="/Users/thiru/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
@Thiruppathi
Thiruppathi / data-structure.js
Last active August 29, 2015 14:27 — forked from sararob/data-structure.js
Role-based security in Firebase
/*
This example shows how you can use your data structure as a basis for
your Firebase security rules to implement role-based security. We store
each user by their Twitter uid, and use the following simplistic approach
for user roles:
0 - GUEST
10 - USER
20 - MODERATOR