Skip to content

Instantly share code, notes, and snippets.

View prakhar-goel's full-sized avatar

Prakhar Kumar Goel prakhar-goel

View GitHub Profile
@prakhar-goel
prakhar-goel / heroku_env_copy.sh
Created September 11, 2017 12:24 — forked from nabucosound/heroku_env_copy.sh
Script to copy environment variables from an existing heroku app to another one
#!/bin/bash
# Source: http://blog.nonuby.com/blog/2012/07/05/copying-env-vars-from-one-heroku-app-to-another/
set -e
sourceApp="$1"
targetApp="$2"
defaultKeys=(DATABASE_URL PAPERTRAIL_API_TOKEN ROLLBAR_ACCESS_TOKEN ROLLBAR_ENDPOINT)
while read key value; do
@prakhar-goel
prakhar-goel / backup-db.sh
Last active March 15, 2019 21:42 — forked from mikedamoiseau/backup-db.sh
Script to backup a MySQL database and send the dump by email and/or scp
#!/bin/bash
# ----------------------------------
# DEFINED - Global variables
# ----------------------------------
# defined temporary folder
DBBACKUP="/dbbackup/"
# database configure