gsutil cors set cors.json gs://exampleproject.appspot.com
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
const hash = require("object-hash"); | |
export const generate = (req: any) => { | |
const company = req.payload && req.payload.user.company._id.toString(); | |
const obj = { | |
method: req.method, | |
originalUrl: req.originalUrl, | |
auth: req.header("Authorization"), | |
device: req.header("Device-Unique-Id"), | |
body: req.body && hash(req.body) |
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
"use strict"; | |
var _oldModuleFunction = angular && angular.module; | |
if (_oldModuleFunction) { | |
angular.module = function () { | |
var _module = _oldModuleFunction.apply(void 0, arguments); | |
if (_module && !_module.info) { | |
_module.info = function () { |
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
RealmQuery.prototype.fullOuterJoin = function(query) { | |
const initialCriteria = this.criteria.slice(); | |
// NOTE: We don't use arrow function because if the criteria of another RealmQuery is joined | |
// NOTE: we want 'this' instance to be used for the call such that values are pushed on to the correct instance. | |
if (initialCriteria.length) { | |
const q1 = function() { | |
return `(${initialCriteria | |
.map(wrapper => { | |
if (Array.isArray(wrapper)) { | |
return `(${wrapper |
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 React from 'react'; | |
import { | |
servicesConnector, | |
addNavigationOptions, | |
watchObservableProps, | |
} from './connectors'; | |
import { realmResultToObservable } from './Utils'; | |
import { Observable } from 'rxjs/Observable'; |
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
export default { | |
Exit: 'Exit', | |
ExitConfirm: 'Are you sure you want to exit this app', | |
YES: 'YES', | |
OK: 'OK', | |
ViewMyOrders: 'View My Oders', | |
CANCEL: 'CANCEL', | |
Confirm: 'Confirm', | |
//Scene's Titles |
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
#source: https://github.com/skylander86/lambda-text-extractor | |
sudo yum install libtool | |
sudo yum install libjpeg-devel libpng-devel libtiff-devel zlib-devel | |
curl http://www.leptonica.com/source/leptonica-1.73.tar.gz | tar xzv | |
cd leptonica-1.73 && ./configure && make && sudo make install && cd .. | |
curl -L https://github.com/tesseract-ocr/tesseract/archive/3.05.tar.gz | tar xzv | |
cd tesseract-3.05/ && ./autogen.sh && ./configure && make && sudo make install && cd .. |
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
Order Allow,Deny | |
Deny from all | |
<FilesMatch "\.(jpg|gif|png|php)$"> | |
Order Deny,Allow | |
Allow from all | |
</FilesMatch> | |
<Directory "Your directory path/uploads/"> | |
Allow from all |
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 jsreportConfig = config.getKey("jsreport", null, null); | |
if(!jsreportConfig){ | |
console.log("jsreport config not found") | |
return res.status(500).end(); | |
} | |
var jsreport = require("jsreport-client")( | |
jsreportConfig.url, | |
jsreportConfig.username, | |
jsreportConfig.password | |
); |
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
'use strict'; | |
// serve/datasources.local.js | |
var mongodbUri = require('mongodb-uri'); | |
var URI = process.env.MONGODB_URI; | |
var uriObject = URI ? mongodbUri.parse(URI) : null; | |
var config = {}; |