Skip to content

Instantly share code, notes, and snippets.

View christianmalek's full-sized avatar

Christian Malek christianmalek

  • Fraunhofer IESE
  • Germany
  • 15:20 (UTC +02:00)
View GitHub Profile
firebase.auth().onAuthStateChanged( user => {
if (user) {
// If user state changes and 'user' exists, check Firebase Database for user
const userReference = db.ref(`users/${user.uid}`);
userReference.once('value', snapshot => {
if (!snapshot.val()) {
// User does not exist, create user entry
userReference.set({
email: user.email,
displayName: user.displayName
@christianmalek
christianmalek / how_to_git.md
Created July 2, 2017 12:47 — forked from fetttobse/how_to_git.md
How to git in agile projects

How to Git

A Git workflow for agile development.

Step 1: Pull from master

First pull from master, to have the latest version of the repo: git pull origin master

Step 2: Checkout a feature branch

Checkout a feature branch, name it with the issue id of the story you are working on and a short description. For example if you are working on #42: User can upload pictures, do something like

Keybase proof

I hereby claim:

  • I am christianmalek on github.
  • I am phis (https://keybase.io/phis) on keybase.
  • I have a public key whose fingerprint is 5E30 E846 DCC0 75AB 1DD3 412F 7475 21FE CC70 4458

To claim this, I am signing this object:

@christianmalek
christianmalek / setRandomCategories.js
Created October 31, 2015 20:09
scattergories random category script
//just paste this in the debug console
function setRandomCategories(categories) {
console.clear();
categories = !categories ? 5 : categories;
var inputs = $($("table")[2]).find("input");
var max = inputs.length;
for (var i = 0; i < categories; i++) {
var randIndex = Math.floor(Math.random() * max);