Skip to content

Instantly share code, notes, and snippets.

@hugodias
hugodias / hubspot_schema.html
Created January 31, 2019 10:12 — forked from lukebussey/hubspot_schema.html
HubSpot Blog Schema.org Markup
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "Organization",
"@id": "#organization",
"name": "Outlyer",
"url": "https://www.outlyer.com/",
"sameAs": [
"https://github.com/outlyerapp",
"https://twitter.com/outlyer",
@hugodias
hugodias / postmortem.md
Last active November 22, 2018 23:22 — forked from mlafeldt/postmortem.md
Post mortem Siteground - All servers down

Siteground (incident #1)

Date

2018-11-22

Authors

  • Hugo
@hugodias
hugodias / pr_etiquette.md
Created May 31, 2018 15:11 — forked from mikepea/pr_etiquette.md
Pull Request Etiquette

Pull Request Etiquette

Why do we use a Pull Request workflow?

PRs are a great way of sharing information, and can help us be aware of the changes that are occuring in our codebase. They are also an excellent way of getting peer review on the work that we do, without the cost of working in direct pairs.

Ultimately though, the primary reason we use PRs is to encourage quality in the commits that are made to our code repositories

Done well, the commits (and their attached messages) contained within tell a story to people examining the code at a later date. If we are not careful to ensure the quality of these commits, we silently lose this ability.

@hugodias
hugodias / rbenv-howto.md
Created July 20, 2017 12:36 — forked from MicahElliott/rbenv-howto.md
Setting up and installing rbenv, ruby-build, rubies, rbenv-gemset, and bundler

Setting up and installing rbenv, ruby-build, rubies, rbenv-gemset, and bundler

This guide enables you to install (ruby-build) and use (rbenv) multiple versions of ruby, isolate project gems (gemsets and/or bundler), and automatically use appropriate combinations of rubies and gems.

TL;DR Demo

# Ensure system is in ship-shape.

aptitude install git zsh libssl-dev zlib1g-dev libreadline-dev libyaml-dev

@hugodias
hugodias / docker-wordpress.sh
Created July 19, 2017 16:42 — forked from tatemz/docker-wordpress.sh
A quick way to get a WordPress installation up and running with Docker
#!/bin/bash
mkdir wordpress-site && cd wordpress-site
touch docker-compose.yml
cat > docker-compose.yml <<EOL
version: "2"
services:
my-wpdb:
@hugodias
hugodias / sidekiq.config
Created April 17, 2017 22:24 — forked from ssaunier/sidekiq.config
Running Sidekiq on AWS Elastic Beanstalk (Put that file in `.ebextensions` folder)
# Sidekiq interaction and startup script
commands:
create_post_dir:
command: "mkdir -p /opt/elasticbeanstalk/hooks/appdeploy/post"
ignoreErrors: true
files:
"/opt/elasticbeanstalk/hooks/appdeploy/post/50_restart_sidekiq.sh":
mode: "000755"
owner: root
group: root
#!/usr/bin/env bash
. /opt/elasticbeanstalk/support/envvars
DIR=/var/app/current
if [ "$WORKER_MODE" = "1" ]
then
if [ -f /var/run/shoryuken.pid ]
then
su -l -c "kill -USR1 `cat /var/run/shoryuken.pid`" root || echo "no process"
su -l -c "rm -f /var/run/shoryuken.pid" root || echo "no file"
fi
SELECT
date_trunc('month', ph1.created_at) AS date,
SUM(SUM(ph2.after - ph2.before))
OVER (
ORDER BY date_trunc('month', ph1.created_at)) AS mrr,
SUM(CASE WHEN ph1.event = 'new'
THEN (ph1.after - ph1.before)
ELSE 0 END) AS new,
SUM(CASE WHEN ph1.event = 'upsell'
THEN (ph1.after - ph1.before)
@hugodias
hugodias / README.md
Created June 11, 2016 16:24 — forked from rjorgenson/README.md
My ZSH Theme

agnoster.zsh-theme

forked by rjorgenson

A ZSH theme optimized for people who use:

  • Solarized
  • Git
  • Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)
  • NVM
  • RVM
@hugodias
hugodias / 0000_packages.config
Created April 12, 2016 20:13 — forked from gcarrion-gfrmedia/0000_packages.config
AWS Elastic Beanstalk Ruby 2.0/Puma Environment - .ebextensions tweaks and Sidekiq configuration. This is known to work fine with AWS Elastic Beanstalk 's 64bit Amazon Linux 2014.03 v1.0.1 running Ruby 2.0 (Puma) stack. Later stack versions might not work, but for that specific version works fine.
# Install Git needed for Git based gems
packages:
yum:
git: []