Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
There is no 'git reset --hard HEAD' in life

Konstantinos Nikoloutsos Nikoloutsos

💭
There is no 'git reset --hard HEAD' in life
  • Athens, Greece
View GitHub Profile
@Nikoloutsos
Nikoloutsos / script for sending push notification to android phone
Created Nov 20, 2020
Send push notification from firebase to android device
View script for sending push notification to android phone
const GOOGLE_API_KEY = "XXXXX";
const GOOGLE_GCM_URL = "https://fcm.googleapis.com/fcm/send";
$fields = array(
'to' => $device_token,
'sound' => 'default',
'priority' => 'high',
'data' => array("title" => $this-title,
"message" => $this->message // You may add more data
)
@Nikoloutsos
Nikoloutsos / .php
Created Apr 1, 2020
Sharing code with John pragias
View .php
<?php
// Get student email
$email = isset($_POST['email']) ? $_POST['email'] : die();
// Include third party library classes
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;
require '../util/phpmailer/Exception.php';
require '../util/phpmailer/PHPMailer.php';