Skip to content

Instantly share code, notes, and snippets.

View lourenzo's full-sized avatar

Lourenzo Ferreira lourenzo

View GitHub Profile
@lourenzo
lourenzo / CommentSection
Created April 3, 2014 22:01
Simple Sublime Text snippet to create a comment that separate sections of code
<snippet>
<content><![CDATA[
/* ${1:<Section Name>}
-------------------------------------------------------------------------- */
]]></content>
<tabTrigger>/*-</tabTrigger>
</snippet>
@lourenzo
lourenzo / index.html
Created May 8, 2020 22:12
Pure CSS Accordion
<h1>Pure CSS Accordion <sup>2.0</sup></h1>
<div class="row">
<div class="col">
<h2>Open <b>multiple</b></h2>
<div class="tabs">
<div class="tab">
<input type="checkbox" id="chck1">
<label class="tab-label" for="chck1">Item 1</label>
<div class="tab-content">
Lorem ipsum dolor sit amet consectetur, adipisicing elit. Ipsum, reiciendis!

Vagas Framefy

Vaga React Front-End Engineer

A Framefy é uma plataforma de soluções para potencializar a produção de vídeos de maneira simples, acessível e personalizada, tanto para empresas como profissionais de criação ao redor do mundo.

Nível: Pleno
Modelo de contratação: PJ
Indústria: Tecnologia da Informação e Serviços

@lourenzo
lourenzo / .bashrc
Created August 23, 2017 08:24
Amazon Linux enable bash_completion and sudo vi colors
# file: /root/.bashrc
alias vi='vim'
@lourenzo
lourenzo / install-lamp-amazon-linux.sh
Last active May 4, 2017 23:38 — forked from sumardi/nginx.default.conf
Install PHP-FPM, Nginx & MySQL on EC2 with Amazon Linux AMI
# Install linux update, followed by GCC and Make
sudo yum -y update
sudo yum install -y gcc make
# Install Nginx and PHP-FPM
sudo yum install -y nginx php-fpm
# Install PHP extensions
sudo yum install -y php-devel php-mysql php-pdo \
php-pear php-mbstring php-cli php-odbc \
@lourenzo
lourenzo / install-redis.sh
Created April 21, 2017 19:48 — forked from khelll/install-redis.sh
Installing Redis on Amazon Linux
#!/bin/bash
###############################################
# To use:
# chmod +x install-redis.sh
# ./install-redis.sh
###############################################
version=3.2.0
echo "*****************************************"
echo " 1. Prerequisites: Install updates, set time zones, install GCC and make"
@lourenzo
lourenzo / Instructions.md
Created March 27, 2017 23:22
Forward 80 to 8080 or any other port in Amazon Linux
  • You will need to do some things as 'root':
sudo su
  • The following command will redirect the port using iptables
/sbin/iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8080
  • Then save your settings
@lourenzo
lourenzo / Install bash-completion on Amazon Linux
Last active October 3, 2016 21:45 — forked from dasgoll/Install bash-completion on Amazon Linux
Install bash-completion on Amazon Linux
# Install bash-completion on Amazon Linux
wget http://www.caliban.org/files/redhat/RPMS/noarch/bash-completion-20060301-1.noarch.rpm
sudo rpm -ivh bash-completion-20060301-1.noarch.rpm
rm bash-completion-20060301-1.noarch.rpm
. /etc/bash_completion
@lourenzo
lourenzo / sublime_revert_open_files.py
Last active December 29, 2015 03:19
Revert all open files on the current window from Sublime Text Console - Works with versions 2 and 3
# Run this one-liner from the Sublime Text console if you need to revert all open documents
[ view.run_command('revert') for view in sublime.Window.views(sublime.active_window()) ]
@lourenzo
lourenzo / waterfall-simple.js
Created July 22, 2015 21:19
Simple Browser Utility function to run sequenced functions
function waterfall() {
var args = [].slice.call(arguments);
var next = args.shift();
if (!next) return;
next(); // @todo: check if it's a Promise
setTimeout(function() { waterfall.apply(null, args); }, 100);
}
// Sample usage:
waterfall(