Use Python to:
- send a plain text email
- send an email with attachment
- receive and filter emails according to some criteria
| #!/usr/bin/env python2 | |
| import SimpleHTTPServer | |
| import SocketServer | |
| import logging | |
| PORT = 8000 | |
| class GetHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): |
| <?php | |
| // Server file | |
| class PushNotifications { | |
| // (Android)API access key from Google API's Console. | |
| private static $API_ACCESS_KEY = 'AIzaSyDG3fYAj1uW7VB-wejaMJyJXiO5JagAsYI'; | |
| // (iOS) Private key's passphrase. | |
| private static $passphrase = 'joashp'; | |
| // (Windows Phone 8) The name of our push channel. | |
| private static $channelName = "joashp"; |
Use Python to:
Helper setup to edit .yaml files with Vim:
List of general purpose commands for Kubernetes management:
| (function() { | |
| /** | |
| * Creates array of timing entries from Resource Timing Interface | |
| */ | |
| function getTimings() { | |
| var entries = []; | |
| var resources = []; | |
| if (window.performance.getEntriesByType !== undefined) { | |
| resources = window.performance.getEntriesByType("resource"); |