Skip to content

Instantly share code, notes, and snippets.

View hmanzur's full-sized avatar
:octocat:
Github Actions Hachathon 2020 Winner

Habid Enrique Manzur Restrepo hmanzur

:octocat:
Github Actions Hachathon 2020 Winner
View GitHub Profile
@hmanzur
hmanzur / aws_eb_to_env.sh
Last active October 15, 2019 17:12
AWS Beanstalk Environment to .env file
# Get environment variables
eb printenv > .env
# Remove First line ("Environment Variables:")
tail -n +2 .env > tmp.txt
# Trim all whitespaces
cat tmp.txt | tr -d "[:blank:]" > .env
# Result .env file
@hmanzur
hmanzur / DjangoDockerfile
Last active February 16, 2021 19:32
Django Dockerfile
FROM python:latest
# Build arg $settings = (stage, develop, production, local, etc)
ARG settings
# Django App name
ARG $app
# Env vars
ENV PYTHONDONTWRITEBYTECODE 1
@hmanzur
hmanzur / BuildExpressDockerfile
Last active October 19, 2019 22:21
Express Nodejs Dockerfile
Dockerize express app with [Sequelize](https://docs.sequelizejs.com) migrations
@hmanzur
hmanzur / gitlab-npm-test-deploy-eb.gitlab-ci.yml
Last active October 19, 2019 22:20
Run Node unit tests and deploy to AWS Beanstalk
stages:
- test
- deploy
test unit:
image: node:latest
stage: test
only:
- develop
- master
@hmanzur
hmanzur / nginx
Last active October 19, 2019 22:19
Nginx http to https redirect
Nginx tips and config
@hmanzur
hmanzur / Dockerrun.aws.json
Last active January 31, 2022 15:25
Beanstalk Environments to Docker container build in .env file
{
"AWSEBDockerrunVersion": "1",
"Logging": "/tmp/app",
"Image": {
"Update": "true"
}
}
@hmanzur
hmanzur / aws-eb-php
Last active December 19, 2021 17:29
AWS Elastic Beanstalk extensions for PHP aplications
Usefull commons extensions to install at ~/.ebextensions directory
@hmanzur
hmanzur / git.bat
Created December 4, 2019 02:43
WSL bash git on Windows
:: @Path C:\Windows\System32\git.bat
::
:: @Use in CMD or Powershell "git <command>"
::
@echo off
C:\Windows\System32\bash.exe -c "git %*"
@hmanzur
hmanzur / NumberMaskedInput.jsx
Last active February 23, 2021 14:44
React component version
import React from 'react'
import PropTypes from 'prop-types'
/**
* NumberMaskedInput component
* Created by habib on 5/06/2020
*
* @public
* @class
@hmanzur
hmanzur / Nest.js Dockerfile
Created July 16, 2020 23:41
Nest.js Dockerfile
# Dockerfile
ARG NODE_VERSION='12.18-alpine'
# --------------- Build
FROM node:${NODE_VERSION} As development
WORKDIR /usr/src/app
COPY package*.json ./