Skip to content

Instantly share code, notes, and snippets.

View senning's full-sized avatar

Senning Luk senning

  • Toronto, Canada
View GitHub Profile
@senning
senning / ShiftSender.gs
Created September 13, 2018 20:30
Google Script to send out volunteer notifications using this spreadsheet: https://docs.google.com/spreadsheets/d/1nw1z3AXUhXaB-zY-e-nBvGdA0P4a4LRzhY6f5_pQ8HA/edit#gid=0
function sendEmails() {
//Get the active spreadsheet file (the one you've opened)
var ss = SpreadsheetApp.getActiveSpreadsheet();
//Get the active sheet, and the cells you've highlighted in it
var dataSheet = ss.getActiveSheet();
var dataSelection = ss.getSelection();
var dataRange = dataSelection.getActiveRange();
//Get the template text from the sheet named "Copy". This script expects...
...
<platform name="android">
...
<resource-file src="resources/android/notification/drawable-hdpi/notification_icon.png" target="app/src/main/res/drawable-hdpi/notification_icon.png" />
<resource-file src="resources/android/notification/drawable-mdpi/notification_icon.png" target="app/src/main/res/drawable-mdpi/notification_icon.png" />
<resource-file src="resources/android/notification/drawable-xhdpi/notification_icon.png" target="app/src/main/res/drawable-xhdpi/notification_icon.png" />
<resource-file src="resources/android/notification/drawable-xxhdpi/notification_icon.png" target="app/src/main/res/drawable-xxhdpi/notification_icon.png" />
<resource-file src="resources/android/notification/drawable-xxxhdpi/notification_icon.png" target="app/src/main/res/drawable-xxxhdpi/notification_icon.png" />
<config-file parent="./application" target="AndroidManifest.xml">
<meta-data android:name="com.google.firebase.messaging.default_notification_icon" android:resource="@drawable/notification_icon"
import { Firebase } from '@ionic-native/firebase';
@NgModule({
...
providers: [
...
Firebase
]
})
@senning
senning / app.component.ts
Last active May 17, 2018 11:24
Ionic with Cordova-Plugin-Firebase
import { Nav, Platform, ToastController } from 'ionic-angular';
import { Firebase } from '@ionic-native/firebase';
constructor(
...
private firebase: Firebase,
public platform: Platform,
//When the app's open, we'll show them as Toasts, but feel free to use an Alert instead
public toastCtrl: ToastController
){
this.platform.ready().then(() => {
@senning
senning / US Zip Codes from 2016 Government Data
Last active May 11, 2020 20:43 — forked from erichurst/US Zip Codes from 2013 Government Data
All US zip codes with their corresponding latitude and longitude coordinates.Comma delimited for your database goodness.Source: http://www.census.gov/geo/maps-data/data/gazetteer.html
This file has been truncated, but you can view the full file.
ZIP,LAT,LNG
00601,18.180555, -66.749961
00602,18.361945, -67.175597
00603,18.455183, -67.119887
00606,18.158345, -66.932911
00610,18.295366, -67.125135
00612,18.402253, -66.711397
00616,18.420412, -66.671979
00617,18.445147, -66.559696