Skip to content

Instantly share code, notes, and snippets.

helderco / .bash_aliases
Last active Nov 20, 2017
Docker aliases
View .bash_aliases
# Add to /etc/hosts
# localhost docker.local db mail
alias docker-host="echo docker.local"
alias drun="docker run -it --rm"
# Docker Compose
alias dc="docker-compose"
helderco / db-open
Created Oct 6, 2015
Script to open a mysql database in Sequel Pro from a service in docker-compose.
View db-open
set -e
show_help() {
cat << EOF
Usage: ${0##*/} [-u USER] [-p PASS] [-P PORT] [-H HOST] [DATABASE]
${0##*/} -h
Open a standard connection in Sequel PRO.
View logstash.conf
input {
stdin {
type => "stdin-type"
file {
type => "syslog"
path => [ "/var/log/*.log", "/var/log/messages", "/var/log/syslog" ]
start_position => "beginning"
helderco /
Last active Jan 2, 2016
port forwarding to remote host with iptables


  • Vagrant
  • VirtualBox

To make it easier to update the virtual box guest additions in case you're running a more updated virtual box, run:

vagrant plugin install vagrant-vbguest
helderco / .bash_profile
Last active Dec 17, 2018
Packages installation in a fresh installation of MacOS X.
View .bash_profile
# Aliases
alias ls='ls -hG'
alias ll='ls -l'
alias la='ls -A'
alias lla='ls -lA'
alias le='ls -lAeO@'
alias cleardns="dscacheutil -flushcache"
alias crontab="VIM_CRONTAB=true crontab"
alias gl="git log --graph --pretty='format:%C(yellow)%h%Cblue%d%Creset %s %C(white)%an, %ar%Creset'"
from pelican import readers
from pelican import signals
from pelican.utils import get_date
import json
# in lambda x, y: {what to return} ... x is the metadata string and y is settings
def process_json(value, settings):
# do something with `value` such as some cleanup if needed
return json.loads(value)
helderco /
Last active Dec 17, 2015
Utility to sync local installation of Drupal with a remote one
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# dependency:
# pip install clint
from __future__ import print_function
import sys
import os