Skip to content

Instantly share code, notes, and snippets.

View hemnathmouli's full-sized avatar
🕸️
Converting Coffee -> Code

Hemnath Mouli hemnathmouli

🕸️
Converting Coffee -> Code
View GitHub Profile
@hemnathmouli
hemnathmouli / monitor.php
Created September 16, 2016 23:48 — forked from jesobreira/monitor.php
Server Monitor
<?php
/*
The aim is to create a functional server monitor based on the one
showed on Mark Zuckerberg's monitor on The Social Network movie.
Run so:
php monitor.php
Notes:
- The server LogFormat must be "Common Log Format" (%h %^[%d:%^] "%r" %s %b)
@hemnathmouli
hemnathmouli / gist:03a39d334d5007c716e2df4bfad5db1f
Created March 3, 2018 22:08 — forked from prime31/gist:5675017
Simple PHP script showing how to send an Android push notification. Be sure to replace the API_ACCESS_KEY with a proper one from the Google API's Console page. To use the script, just call scriptName.php?id=THE_DEVICE_REGISTRATION_ID
<?php
// API access key from Google API's Console
define( 'API_ACCESS_KEY', 'YOUR-API-ACCESS-KEY-GOES-HERE' );
$registrationIds = array( $_GET['id'] );
// prep the bundle
$msg = array