Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
building interesting things!

Sagar Jauhari sagarjauhari

💭
building interesting things!
View GitHub Profile
@sagarjauhari
sagarjauhari / main.tf
Created Jun 11, 2019
Handling secrets in ECS tasks
View main.tf
data "template_file" "blog" {
template = "${file("template.json")}"
vars {
app_name = "blog"
environment = "staging"
region = "us-east-1"
account = "12341234"
}
}
View template.json
[
{
"secrets": [
{
"name": "DATABASE_PASSWORD",
"valueFrom": "arn:aws:ssm:${region}:${account}:parameter/${environment}/${appName}/DATABASE_PASSWORD"
}
]
}
]
@sagarjauhari
sagarjauhari / output.txt
Created May 18, 2019
Start a shell on a fresh image
View output.txt
❯ dc run dev sh
Creating network "app_default" with the default driver
Creating app_db_1 ... done
#
View docker-aliases.sh
# Show live stats
alias ds='while true; do TEXT=$(docker stats --no-stream $(docker ps --format "{{.Names}}")); sleep 0.1; clear; echo "$TEXT"; done'
# Kill all containers
alias dk='docker kill $(docker ps -q)'
# Docker compose
alias dc='docker-compose'
@sagarjauhari
sagarjauhari / Dockerfile
Created May 18, 2019
Initial dockerfile
View Dockerfile
FROM golang
@sagarjauhari
sagarjauhari / docker-compose.yml
Created May 18, 2019
docker-compose with database
View docker-compose.yml
version: '3'
services:
db:
image: postgres
environment:
POSTGRES_PASSWORD: password
ports:
- "5432:5432"
dev:
build: .
@sagarjauhari
sagarjauhari / docker-compose.yml
Created May 18, 2019
Initial docker-compose.yml
View docker-compose.yml
version: '3'
services:
dev:
build: .
View hello.py
class Animal:
def name(self):
return "Simba"
View keybase.md

Keybase proof

I hereby claim:

  • I am sagarjauhari on github.
  • I am sagj (https://keybase.io/sagj) on keybase.
  • I have a public key whose fingerprint is 77DB 9DD0 4DDA 3BF1 EA65 A3DB D5A9 2EB1 D655 A47A

To claim this, I am signing this object:

View dashing-heroku.md

Add the following to your Gemfile:

gem 'heroku-api'

Put heroku.rb in your jobs folder and add the contents of heroku.html into your layout.

You can’t perform that action at this time.