$ docker-compose up -d
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
grep -rF \ | |
-e "eval(" \ | |
-e "base64_decode(" \ | |
-e "shell_exec(" \ | |
-e "exec(" \ | |
-e "passthru(" \ | |
-e "popen(" \ | |
-e "proc_open(" \ | |
-e "system(" \ | |
-e "assert(" \ |
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 crypto = require("crypto"); | |
private getAPIKey(): string { | |
return process.env.BUNNY_STREAM_API_KEY | |
} | |
private getSignature(library_id, video_id, expiration_time = 86400) { | |
//https://docs.bunny.net/reference/tus-resumable-uploads | |
const expires = Math.floor(new Date() as any / 1000) + expiration_time; |
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 { inject, injectable } from "inversify"; | |
import { ICustomerModel } from "../../Infra/Models/Customer.model"; | |
import log, { LogLevelEnum } from "../Utils/logger.util"; | |
require("dotenv").config(); | |
const axios = require("axios").default; | |
export interface IIuguService { | |
getCustomers(): Promise<any> | |
getCustomerById(id: any): Promise<any> |
This will guide you through setting up a replica set in a docker environment using.
- Docker Compose
- MongoDB Replica Sets
- Mongoose
- Mongoose Transactions
Thanks to https://gist.github.com/asoorm for helping with their docker-compose file!
Setup:
Add before end of body in your public/index.html
<script type="text/javascript" src="https://js.iugu.com/v2"></script>
Using example:
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 path = require('path'); | |
const loadHandlers = () => { | |
return new Promise(async (resolve, reject) => { | |
const fs = require('fs'); | |
const dir = path.join(process.cwd(), process.env.NODE_ENV != 'production' ? 'src' : '','/Presentation/Handlers') | |
log(LogLevelEnum.INFO, `Loading controllers from ${dir}`) | |
await fs.readdir(dir, async (err, files) => { | |
let reducers = files.filter(a => a.includes('.')); |
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
public async getKeycloakUserByEmail(email: String): Promise<any> { | |
const config = { | |
headers: { | |
Authorization: 'Bearer '+ await this.getApplicationServiceToken(), | |
} | |
}; | |
return axios.get(`${this.BASE_URL}/auth/admin/realms/shallwe/users?email=${email}`, config) | |
} |
Here is a high level overview for what you need to do to get most of an Android environment setup and maintained.
Prerequisites (for Homebrew at a minimum, lots of other tools need these too):
- XCode is installed (via the App Store)
- XCode command line tools are installed (
xcode-select --install
will prompt up a dialog) - Java
Install Homebrew:
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
NewerOlder