Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Mohamed Fouad MohammedFouad

🎯
Focusing
Block or report user

Report or block MohammedFouad

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@MohammedFouad
MohammedFouad / CountDownTimer.java
Created Oct 21, 2017 — forked from bverc/CountDownTimer.java
Drop-in alternative for the Android CountDownTimer class, but which you can cancel from within onTick. Modified to include pause and resume functionality.
View CountDownTimer.java
/*
* 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
View android_material_design_colours.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- google's material design colours from
http://www.google.com/design/spec/style/color.html#color-ui-color-palette -->
<!--reds-->
<color name="md_red_50">#FFEBEE</color>
<color name="md_red_100">#FFCDD2</color>
<color name="md_red_200">#EF9A9A</color>
@MohammedFouad
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 https://www.youtube.com/watch?v=Abh3r9hh5gw&list=PLGCjwl1RrtcRHjHyZAxm_Mq4qvtnundo0&index=4
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');
admin.initializeApp();
exports.sendNotification = functions.firestore.document('Users/{user_id}/Notifications/{notification_id}').onWrite ((change, context) => {
@MohammedFouad
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
}
}
You can’t perform that action at this time.