This file contains 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
### Keybase proof | |
I hereby claim: | |
* I am evilurge on github. | |
* I am evilurge (https://keybase.io/evilurge) on keybase. | |
* I have a public key ASDtn_MWVDpdsa6Did8RWtLKYNqkG3GFXSfaB-OGON0Idwo | |
To claim this, I am signing this object: |
This file contains 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
nginx-proxy: | |
image: jwilder/nginx-proxy:latest | |
ports: | |
- "80:80" | |
- "443:443" | |
volumes: | |
- '/home/docker/nginx-proxy/ssl:/etc/nginx/certs:ro' | |
- '/etc/nginx/vhost.d' | |
- '/usr/share/nginx/html' | |
- '/var/run/docker.sock:/tmp/docker.sock:ro' |
This file contains 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 server = require(`./src/server`); | |
process.env.NODE_ENV === "DEV" ? | |
/** | |
* If dev environment, run express server for local debugging. | |
*/ | |
server.listen(process.env.PORT || 3000) : | |
/** | |
* Creates a function instance and with a specific specs. |
This file contains 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
module.exports = (() => { | |
/** | |
* Map all available handlers to express route. | |
* @type {{handler}|*} | |
*/ | |
const fs = require('fs'); | |
const express = require('express'); | |
const bodyParser = require('body-parser'); | |
const bunyan = require('bunyan'); |
This file contains 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
process.env.NODE_ENV = process.env.NODE_ENV ? process.env.NODE_ENV : 'development'; | |
require('../src/firebase').admin.firestore().collection('configurations').get() | |
.then(documents => | |
documents.forEach((document) => | |
require('fs').writeFile(`${require('../src/utils').baseDir}/config/${document.id}.json`, JSON.stringify(document.data()), (error) => | |
error ? console.error(error) : console.log(`Configuration file ${document.id}.json has been created!`)))); |
This file contains 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 fs = require('fs'); | |
const token = process.env['FIREBASE_TOKEN']; // Keep your firebase cli token in FIREBASE_TOKEN as a env param | |
const projectName = (JSON.parse(fs.readFileSync(`${__dirname}/.firebaserc`, 'utf8'))) | |
.projects[process.env.NODE_ENV ? process.env.NODE_ENV : 'default']; | |
/** | |
* FireBase Deployment script | |
* FOR CI USE ONLY! | |
*/ |
This file contains 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 logging | |
from json import loads | |
from django.apps import apps | |
from django.core.exceptions import FieldDoesNotExist, FieldError | |
from django.core.serializers import serialize | |
from django.http import JsonResponse | |
logger = logging.getLogger(__name__) |
This file contains 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 logging | |
logger = logging.getLogger(__name__) | |
def report(saved_object): | |
""" | |
report is the main function in reporter | |
# :param uid: django ORM unique identifier; for internal usage. |
This file contains 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
require('dotenv').config() | |
const admin = require("firebase-admin"); | |
admin.initializeApp({ | |
credential: admin.credential.cert( | |
process.env.NODE_ENV === 'production' | |
? require('./gcp.json') | |
: JSON.parse(process.env.FIREBASE_ADMIN_SDK) | |
), | |
databaseURL: process.env.FIREBASE_DATABASE_URL | |
}); |
This file contains 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
exports.handler = async (event, context, callback) => { | |
const | |
baseJFrogURL = 'https://yourorg.jfrog.io/artifactory', | |
request = event.Records[0].cf.request, | |
body = request.body; | |
switch (body.action) { | |
case 'added': | |
const orgEmailAddress = useJeffUserQueryHere(body.member.login) // Your place to shine! | |
const payload = { |
OlderNewer