Skip to content

Instantly share code, notes, and snippets.


Mohamed Fouad MohammedFouad

  • Freelancer
  • Egypt
View GitHub Profile
MohammedFouad / database.rules.json
Created Jun 24, 2019 — forked from codediodeio/database.rules.json
Common Database Rules for Firebase
View database.rules.json
// No Security
"rules": {
".read": true,
".write": true
MohammedFouad / index.js
Last active Sep 19, 2019
This code is for device to device firebase notifications, Thanks for TVAC Studio channel for great tutorial on youtube
View index.js
'use strict'
// The Cloud Functions for Firebase SDK to create Cloud Functions and setup triggers.
const functions = require('firebase-functions');
// The Firebase Admin SDK to access the Firebase Realtime Database.
const admin = require('firebase-admin');
exports.sendNotification = functions.firestore.document('Users/{user_id}/Notifications/{notification_id}').onWrite ((change, context) => {
View android_material_design_colours.xml
<?xml version="1.0" encoding="utf-8"?>
<!-- google's material design colours from -->
<color name="md_red_50">#FFEBEE</color>
<color name="md_red_100">#FFCDD2</color>
<color name="md_red_200">#EF9A9A</color>
MohammedFouad /
Created Oct 21, 2017 — forked from bverc/
Drop-in alternative for the Android CountDownTimer class, but which you can cancel from within onTick. Modified to include pause and resume functionality.
* Copyright (C) 2008 The Android Open Source Project
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* Unless required by applicable law or agreed to in writing, software