It is sometimes necessary to have files in a container that shouldn't ever end up in an image. These files are generally some form of private key or password that aren't allowed to be distributed. This document details a few usecases for such files and their requirements.
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 | |
cd "$(dirname "$0")" | |
ROOT_DIR="$(pwd)" | |
FINAL_APK="${FINAL_APK:-$ROOT_DIR/android-release-$(date +%Y%m%d-%H%M).apk}" | |
KEYSTORE="${KEYSTORE:-$ROOT_DIR/android-release.keystore}" | |
if test ! -e "$KEYSTORE"; then | |
echo "ERROR: Keystore file $KEYSTORE not found." |
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 { createCipheriv, createDecipheriv, randomBytes } from "crypto"; | |
const ENCRYPTION_KEY: string = process.env.ENCRYPTION_KEY || ""; // Must be 256 bits (32 characters) | |
const IV_LENGTH: number = 16; // For AES, this is always 16 | |
/** | |
* Will generate valid encryption keys for use | |
* Not used in the code below, but generate one and store it in ENV for your own purposes | |
*/ | |
export function keyGen() { |
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
# Description: | |
# Helper commands for YNAB Pull Requests | |
# | |
# Commands: | |
# hubot rebuild - Rebuilds this branch. | |
# hubot ketchup|catchup|catch_up|upbase|reverse integrate|reverse_integrate|backmerge|back_merge - Merges the target branch back into this pull request branch. | |
TextMessage = require('hubot').TextMessage | |
GitHubApi = require("github"); # https://github.com/mikedeboer/node-github |
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 mongo = require('mongoskin'); | |
var db = mongo.db('127.0.0.1:27017/test'); | |
// create index: | |
// key, unique, callback | |
db.collection('user').ensureIndex([['name', 1]], true, function(err, replies){}); | |
// bind method: db.user ===> db.collection('user') | |
db.bind('user'); |