The Gist has turned into: https://github.com/TvrboPro/TvrboBackup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var CACHE_NAME = 'tvrbo-cache'; | |
| var filesToCache = [ | |
| './bundle.js' | |
| ]; | |
| self.addEventListener('install', function(event) { | |
| event.waitUntil(caches.open(CACHE_NAME).then(function(cache) { | |
| return cache.addAll(filesToCache); | |
| })); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var Promise = require('bluebird'); | |
| module.exports = function wrap(genFn) { | |
| const promisedFunc = Promise.coroutine(genFn); | |
| return (req, res, next) => { | |
| promisedFunc(req, res, next).catch(next); | |
| } | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Vanilla Debian Jessie Setup | |
| sudo su - | |
| # DEBIAN JESSIE SETUP SCRIPT | |
| # ------------------------------------------------------------------------- | |
| # VARIABLES |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // CSS | |
| require('../node_modules/ng-admin/build/ng-admin.min.css'); | |
| // ALL IN ONE | |
| require('ng-admin/build/ng-admin-only.min'); | |
| // JS | |
| // var angular = require('angular/angular.min.js'); | |
| require('angular-ui-bootstrap/dist/ui-bootstrap-tpls.js'); | |
| require('angular-bootstrap/ui-bootstrap.min'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import config from 'config'; | |
| import { sendMail } from './mailer'; | |
| export function sendValidationEmail(recipientEmail, userId, validationToken){ | |
| let htmlContent, txtContent, title; | |
| title = "Welcome to Right Side Coffee" | |
| htmlContent = `<html><head><style> body { font-family: monospace; }</style></head><body> | |
| <p>Welcome to Right Side Coffee,</p> | |
| <p>To activate your account, click on <a href="${config.SERVER_URL}/en/confirm/${userId}/${validationToken}">the link here</a>.</p> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
| { | |
| "presets": [ | |
| "es2015", | |
| "react", | |
| "stage-1" | |
| ], | |
| "plugins": [ | |
| "transform-decorators-legacy" | |
| ], | |
| "compact": true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var config = require('../config.js'); | |
| var gcm = require("node-gcm"); | |
| var gcmConnection = new gcm.Sender(config.GCM_KEY); | |
| global.Promise = require('bluebird'); | |
| var zip = require('lodash/zip'); | |
| var feedbackHandlers = []; | |
| function send(pushTokens, message, payload, expiry, unreadCounter){ | |
| return new Promise((resolve, reject) => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var gulp = require('gulp'); | |
| // ICONS | |
| gulp.task('icons', function() { | |
| var lwip = require('lwip'); | |
| // Default | |
| lwip.open('resources/icon.png', function(err, image){ | |
| if(err) return console.error(err); | |
| image.batch().cover(57, 57).writeFile('resources/ios/icon/icon.png', 'png', {transparency: 'auto'}, function(){if(err)console.error(err);}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # CREATE CERTS | |
| echo "Android: http://dev.tapjoy.com/faq/how-to-find-sender-id-and-api-key-for-gcm/" | |
| echo "iOS: http://quickblox.com/developers/How_to_create_APNS_certificates" | |
| # EXTRACT P12 > PEM | |
| openssl pkcs12 -in apn-push-prod.p12 -out apn-push-prod.pem -nodes -clcerts |