build your Docker image first
docker build -t tmp-image:latest
#!/bin/bash | |
ACCOUNT_ID="xxxxxxxx" && \ | |
REGION="us-west-2" && \ | |
REPO="go-http-server" | |
# Login to ecr | |
$(aws ecr get-login --no-include-email --region ${REGION}) |
#!/bin/sh | |
RED='\033[0;31m' | |
NC='\033[0m' # No Color | |
test_results=$(script -q /dev/null pipenv run python -m pytest ./test -v --tb=no) | |
if [ $? -eq 1 ]; then | |
printf "${RED}CANNOT COMMIT, PYTEST FAILED\n\nPYTEST RESULTS:\n" | |
echo "$test_results" | |
exit 1 | |
fi |
#!/usr/bin/env python | |
"""Download conversations, customers, and attachments from a Help Scout mailbox | |
Written by Jonathan Kamens (jik@kamens.us). | |
Released into the public domain. | |
Email me patches if you have enhancements you'd like me to incorporate. Don't | |
bother emailing me bug reports or suggestions; this script does exactly what I |
# If you don't remember the exact path/name, search the log for deleted files | |
git log --diff-filter=D --summary | grep delete | |
# Find the file you want to get from the ouput, and use the path | |
# Find the commits that involved that path | |
git log --all -- some/path/to/deleted.file | |
# Bring the file back to life to the current repo (sha commit of parent of commit that deleted) | |
git checkout shaofthecommitthatdeletedthefile^ -- some/path/to/deleted.file |
app.listen(3000); | |
console.log("Running at Port 3000"); | |
Final words: | |
Right now we are resolving path in each router. You can optimize this little bit. Express have configuration variable which let’s you define static file path so that you don’t need to resolve path in every routes. Here is how to do so. | |
var express = require("express"); | |
var app = express(); | |
app.use(express.static(__dirname + '/View')); |
# delete local tag '12345' | |
git tag -d 12345 | |
# delete remote tag '12345' (eg, GitHub version too) | |
git push origin :refs/tags/12345 | |
# alternative approach | |
git push --delete origin tagName | |
git tag -d tagName |
var data = "do shash'owania"; | |
var crypto = require('crypto'); | |
crypto.createHash('md5').update(data).digest("hex"); |