Skip to content

Instantly share code, notes, and snippets.

View jwcastillo's full-sized avatar
🏠
Working from home

José Wenceslao Castillo jwcastillo

🏠
Working from home
View GitHub Profile
@jwcastillo
jwcastillo / dockerfile
Created May 29, 2021 14:25
Docker Terraform + Terratest + GCloudSDK + Ruby
FROM golang:latest
ARG TERRAFORM_VERSION="0.12.19"
ENV TERRAFORM_VERSION="${TERRAFORM_VERSION}"
ARG GCLOUDSDK_VERSION="342.0.0"
ENV GCLOUDSDK_VERSION="${GCLOUDSDK_VERSION}"
ARG RUBY_VERSION="2.7.2"
ENV RUBY_VERSION="${RUBY_VERSION}"
ARG RUBYBUILD_RELEASE="20210526"
ENV RUBYBUILD_RELEASE="${RUBYBUILD_RELEASE}"

Implementing a Strong Code-Review Culture

As an author

  • Provide more/sufficient context around changes
  • Linking to the issue isn't always enough
  • Challenge: 2 paragraphs of context

As a reviewer

  • Offer compliments in PRs when you learn or something is done well
  • Ask questions rather than make demands/commands, engage in conversation
@jwcastillo
jwcastillo / slack.sh
Created July 7, 2020 05:09 — forked from andkirby/slack.sh
Shell/Bash script for sending slack messages.
#!/usr/bin/env bash
####################################################################################
# Slack Bash console script for sending messages.
####################################################################################
# Installation
# $ curl -s https://gist.githubusercontent.com/andkirby/67a774513215d7ba06384186dd441d9e/raw --output /usr/bin/slack
# $ chmod +x /usr/bin/slack
####################################################################################
# USAGE
# Send message to slack channel/user
@jwcastillo
jwcastillo / create-self-signed-certificate.sh
Created January 24, 2020 19:38 — forked from ivan-pinatti/create-self-signed-certificate.sh
Create self-signed certificate - #linux #openssl #certificate
#!/usr/bin/env bash
: ' Script to create self-signed certificate
'
# check if debug flag is set
if [ "${DEBUG}" = true ]; then
set -x # enable print commands and their arguments as they are executed.
@jwcastillo
jwcastillo / create-self-signed-certificate.sh
Created January 24, 2020 19:38 — forked from ivan-pinatti/create-self-signed-certificate.sh
Create self-signed certificate - #linux #openssl #certificate
#!/usr/bin/env bash
: ' Script to create self-signed certificate
'
# check if debug flag is set
if [ "${DEBUG}" = true ]; then
set -x # enable print commands and their arguments as they are executed.
@jwcastillo
jwcastillo / Update-branch.md
Created April 26, 2019 13:51 — forked from santisbon/Update-branch.md
Bring your feature branch up to date with master. Deploying from Git branches adds flexibility. Bring your branch up to date with master and deploy it to make sure everything works. If everything looks good the branch can be merged. Otherwise, you can deploy your master branch to return production to its stable state.

Updating a feature branch

First we'll update your local master branch. Go to your local project and check out the branch you want to merge into (your local master branch)

$ git checkout master

Fetch the remote, bringing the branches and their commits from the remote repository. You can use the -p, --prune option to delete any remote-tracking references that no longer exist in the remote. Commits to master will be stored in a local branch, remotes/origin/master

Keybase proof

I hereby claim:

  • I am jwcastillo on github.
  • I am jwcastillo (https://keybase.io/jwcastillo) on keybase.
  • I have a public key ASA4A6VSiCg0H-6ZnXoHOX4nHMgnQ5wuZiXJAP6-FGzqMAo

To claim this, I am signing this object:

@jwcastillo
jwcastillo / sonar-report.groovy
Created October 2, 2018 18:28 — forked from isurusndr/sonar-report.groovy
Jenkins email-ext plugin groovy template. Generates daily Sonar violations report grouped by culprits. Updated to work with SonarQube version 5.0+
<!DOCTYPE html>
<head>
<title>Sonar violations report</title>
<style type="text/css">
body
{
margin: 0px;
padding: 15px;
}
@jwcastillo
jwcastillo / groovySql.groovy
Created September 8, 2018 19:31 — forked from saltnlight5/groovySql.groovy
Groovy Script Examples
// groovy -cp $HOME/.m2/repository/com/h2database/h2/1.3.166/h2-1.3.166.jar groovySql
// http://groovy.codehaus.org/Tutorial+6+-+Groovy+SQL
// Grab will not load the driver! but at least we can trigger it to download it and then use groovy -cp option to run this script.
// @Grab('com.h2database:h2:1.3.166')
import groovy.sql.Sql
sql = Sql.newInstance(
'jdbc:h2:~/test',
@jwcastillo
jwcastillo / devops_best_practices.md
Created August 16, 2018 23:09 — forked from jpswade/devops_best_practices.md
Devops Best Practices

DevOps started out as "Agile Systems Administration". In 2008, Andrew Shafer did a talk called "Agile Infrastucture" addressing issues around involving more of the company in the same disciplines as programmers.

In 2009, Patrick Debois created "DevOpsDays" conference to help to bring it to light. However, it wouldn't begin to trend until about 2010, when people would begin to describe it as a standalone discipline.

Today, DevOps goes beyond just developers, systems administration and infrastructure, its about [dev, ops, agile, cloud, open source and business](https://blogs.the451group.com/opensource/2010/03/03/devops-mixing-dev-ops-agile-cloud-open-source-and-busi