Skip to content

Instantly share code, notes, and snippets.

View AndrewEckart's full-sized avatar

Andrew Eckart AndrewEckart

  • SpaceX
  • Seattle, WA
View GitHub Profile
@vibgy
vibgy / fcm-data-message-service-worker.js
Last active January 20, 2022 16:08
Angular Service and Service Worker Code to handle FCM data messages and to enable a click handler for notifications shown using showNotification
//
// serviceWorkerService.js
//
'use strict';
angular.module('myApp.serviceWorker', [])
.service('serviceWorkerService', ['$q', '$http', '$location', '$timeout',
function($q, $http, $location, $timeout) {
var noTokenError = new Error('No Instance ID token available');
var noPermissionError = new Error('Unable to get permission to notify');
@vigneshwaranr
vigneshwaranr / migrator.sh
Created August 24, 2012 18:34
Script to convert SQLITE dumps into PostgreSQL compatible dumps
#! /bin/sh
usage_error () {
echo 'Usage: sh migrator.sh <path to sqlite_to_postgres.py> <path to sqlite db file> <an empty dir to output dump files>'
echo
echo 'Example:'
echo '>sh migrator.sh sqlite_to_postgres.py ~/reviewboard.db /tmp/dumps'
echo
echo 'Tested on:'
echo 'Python 2.7.3'