Skip to content

Instantly share code, notes, and snippets.

View kazaky's full-sized avatar
Saving user's battery

Ahmed Elshahawi kazaky

Saving user's battery
View GitHub Profile
payload = {
notification: {
title: `You ordered a new product`,
click_action_name : 'HANDLE_NOTIFICATION',
},
data : {
product_id : 'ABC98292',
type : `Clothes`,
product_name : 'Cotton spring shirt'
}
@kazaky
kazaky / material_design_guidelines_dimens.xml
Created November 12, 2017 12:45 — forked from aeroechelon/material_design_guidelines_dimens.xml
Recommended Material Design Dimensions for Android
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!--
# Material Design Dimensions
These dimensions are provided as per Material Design Guidelines
to adhere to a 8 dp baseline grid. (With the exception of the
toolbar and notification bar.).
## References
@kazaky
kazaky / Q1 and Q2
Last active November 7, 2016 19:54
Questions demo
// Open Another Activity
Intent myIntent = new Intent(ContactActivity.this, ContactListActivity.class);
// Send Key, Value Pair
myIntent.putExtra("studid", "123456");
startActivity(myIntent);
@kazaky
kazaky / find.c
Last active October 16, 2016 15:52
/**
* find.c
*
* Computer Science 50
* Problem Set 3
*
* Prompts user for as many as MAX values until EOF is reached,
* then proceeds to search that "haystack" of values for given needle.
*
* Usage: ./find needle
@kazaky
kazaky / designer.html
Last active August 29, 2015 14:07
designer
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-drawer-panel/core-drawer-panel.html">
<polymer-element name="my-element">
<template>
<style>
:host {
/*
* Copyright (C) 2013 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