Skip to content

Instantly share code, notes, and snippets.

@prime31
prime31 / gist:5675017
Last active April 2, 2024 03:55
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
@jclement
jclement / pretty_print_helper.js
Created July 18, 2012 20:08
Javascript function to decorate all pre/code blocks with "prettyPrint" for Google's code highlighting
function styleCode()
{
if (typeof disableStyleCode != "undefined")
{
return;
}
var a = false;
$("pre code").parent().each(function()