Skip to content

Instantly share code, notes, and snippets.

@hugodias
hugodias / init.vim
Created January 17, 2018 01:40
My Neovim config file
filetype off
call plug#begin()
" Languages and frameworks
Plug 'vim-ruby/vim-ruby'
Plug 'tpope/vim-rails'
Plug 'pangloss/vim-javascript'
Plug 'mileszs/ack.vim'
Plug 'junegunn/vim-easy-align'

Wordpress performance checklist

This is a Wordpress performance checklist

Measuring

# Retrieve all files changes in last 10 commits
git diff --name-only HEAD~10
@hugodias
hugodias / init.vim
Created July 31, 2017 12:45
My Vim init file
filetype off
call plug#begin()
" Languages and frameworks
Plug 'vim-ruby/vim-ruby'
Plug 'tpope/vim-rails'
Plug 'pangloss/vim-javascript'
Plug 'mileszs/ack.vim'
Plug 'janko-m/vim-test'
require 'csv'
my_array = [["a", "b"], ["c", "d"]]
CSV.open("myfile.csv", "w") do |csv|
my_array.each do |m|
csv << m
end
end
@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-compose.yml
Last active October 17, 2017 17:31
Docker compose file for wordpress development
version: "2"
services:
my-wpdb:
image: mariadb
ports:
- "8081:3306"
environment:
MYSQL_ROOT_PASSWORD: ChangeMeIfYouWant
volumes:
- mariadb:/var/lib/mysql
@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 / polyglotwip.sh
Last active August 9, 2017 16:30
Work in progress commits in 9 different languages
wip() {
OPTIONS=("Lucrează în desfășurare" "Đang làm việc" "進行中の作業" "radovi u tijeku" "работа в процессе" "Travaux en cours" "Ntchito ikupitirira")
RAND=$((1 + $RANDOM % 7));
SELECTED=${OPTIONS[$RAND]};
git add -A; git rm $(git ls-files --deleted) 2> /dev/null; git commit --no-verify -m "--$SELECTED-- [skip ci]"
}
alias wip=wip()
files:
# If this file is edited, it must be removed from EC2 instance prior to deploy.
"/opt/elasticbeanstalk/hooks/appdeploy/pre/09_yarn_install.sh" :
mode: "000775"
owner: root
group: users
content: |
#!/usr/bin/env bash
set -xe