Skip to content

Instantly share code, notes, and snippets.

View dgoguerra's full-sized avatar

Diego Guerra dgoguerra

View GitHub Profile
@Herz3h
Herz3h / install.md
Last active June 14, 2022 18:18
Locales alpine 3.9

Copy locale.md file below into same directory as your Dockerfile

FROM alpine:3.9

# Install language pack
RUN apk --no-cache add ca-certificates wget && \
    wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub && \
    wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.25-r0/glibc-2.25-r0.apk && \
@yugarinn
yugarinn / git-flow.md
Last active January 29, 2019 22:13
Gitflow Blog Post

YAGFBWP

"Yet Another Gitflow Based Workflow Post"

Introduction

Working with Git is easy. At the same time, it has enough depth and features to let you screw up your codebase at a considerable level. That's why the web is full of Git tutorials, blog posts and articles. That's also why a bunch of smart people have come up with certain Git workflows to avoid finding yourself lost in a sea of unmanageable changes. Let's dig into one of them.

As every decent Version Control System, Git has three core functionalities: store content, track changes to that content, and distribute the content and change history to possible collaborators. The way those changes are stored and organized is entirely up to the developer. This is going to be a very opinionated post about how to organize your Git workflow. I will explain how one these already existing workflow works, and introduce some small rules and changes on top of it. Said workflow is, obviosuly, Gitflow, created by Vincent Driessen.

Prerequisites

F

@jakebathman
jakebathman / logslaravel.sh
Created August 19, 2018 00:06
Tail Laravel logs and filter out the stack traces
tail -f -n 450 storage/logs/laravel*.log \
| grep -i -E \
"^\[\d{4}\-\d{2}\-\d{2} \d{2}:\d{2}:\d{2}\]|Next [\w\W]+?\:" \
--color
@KJTsanaktsidis
KJTsanaktsidis / aws_shell.py
Created November 15, 2017 00:02
Python script to load temporary credentials for 2FA
#!/usr/bin/env python
# EB CLI doesn't support assuming roles like the AWS CLI does. This script is a workaround that requests
# temporary credentials, then exports them to the environment for packer to use.
# It then shares the AMI to the dev / prod accounts (from the cooporate account)
import ConfigParser
from os.path import expanduser
import boto3
import boto3.session
@culttm
culttm / axios.refresh_token.js
Created October 5, 2017 18:46
axios interceptors for refresh token
axios.interceptors.response.use(function (response) {
return response;
}, function (error) {
const originalRequest = error.config;
if (error.response.status === 401 && !originalRequest._retry) {
originalRequest._retry = true;
@justinwhite
justinwhite / cloudbuild.yaml
Created September 29, 2017 23:39
Build file to auto deploy to app engine from a github push
steps:
- name: 'gcr.io/cloud-builders/gcloud'
args: ['app', 'deploy']
@magnetikonline
magnetikonline / README.md
Last active April 22, 2025 12:58
List all Git repository objects by size.

List all Git repository objects by size

Summary

Bash script which will:

  • Iterate all commits made within a Git repository.
@nfarina
nfarina / mock-storage.js
Last active November 23, 2023 15:50
Mock Google Cloud Storage for JS
//
// Quick & Dirty Google Cloud Storage emulator for tests. Requires
// `stream-buffers` from npm. Use it like this:
//
// `new MockStorage().bucket('my-bucket').file('my_file').createWriteStream()`
//
class MockStorage {
buckets: {[name: string]: MockBucket};
@tomfa
tomfa / BeanstalkViaTerraform
Last active March 15, 2022 07:51
Adding Beanstalk roles with Terraform
resource "aws_iam_instance_profile" "beanstalk_service" {
name = "beanstalk-service-user"
roles = ["${aws_iam_role.beanstalk_service.name}"]
}
resource "aws_iam_instance_profile" "beanstalk_ec2" {
name = "beanstalk-ec2-user"
roles = ["${aws_iam_role.beanstalk_ec2.name}"]
}
@tomfa
tomfa / AWSElasticBeanstalkMulticontainerDocker
Last active February 13, 2020 14:30
Beanstalk EC2 instance profile policies
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "ECSAccess",
"Effect": "Allow",
"Action": [
"ecs:Poll",
"ecs:StartTask",
"ecs:StopTask",