Skip to content

Instantly share code, notes, and snippets.

@NicolasPio
NicolasPio / vimrc
Last active December 10, 2020 11:57
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
""" ## ## #### ## ## ######## ######
""" ## ## ## ### ### ## ## ## ##
""" ## ## ## #### #### ## ## ##
""" ## ## ## ## ### ## ######## ##
""" ## ## ## ## ## ## ## ##
""" ## ## ## ## ## ## ## ## ##
""" ### #### ## ## ## ## ######
"""
""" Author: Nicolas Pio
@rzani
rzani / Dockerfile
Created January 25, 2017 21:08
Nginx + Pagespeed
FROM debian:jessie
MAINTAINER Rodrigo Zani <[email protected]>
ENV NGINX_VERSION 1.11.9
ENV NPS_VERSION 1.11.33.4
RUN apt-get update && \
apt-get install -y build-essential zlib1g-dev libpcre3 libpcre3-dev unzip make wget libssl-dev && \
rm -rf /var/lib/apt/lists/*
@cvan
cvan / HOWTO.md
Last active May 16, 2025 06:07
How to serve a custom HTTPS domain on GitHub Pages with CloudFlare: *FREE*, secure and performant by default

Instructions

CloudFlare is an awesome reverse cache proxy and CDN that provides DNS, free HTTPS (TLS) support, best-in-class performance settings (gzip, SDCH, HTTP/2, sane Cache-Control and E-Tag headers, etc.), minification, etc.

  1. Make sure you have registered a domain name.
  2. Sign up for CloudFlare and create an account for your domain.
  3. In your domain registrar's admin panel, point the nameservers to CloudFlare's (refer to this awesome list of links for instructions for various registrars).
  4. From the CloudFlare settings for that domain, enable HTTPS/SSL and set up a Page Rule to force HTTPS redirects. (If you want to get fancy, you can also enable automatic minification for text-based assets [HTML/CSS/JS/SVG/etc.], which is a pretty cool feature if you don't want already have a build step for minification.)
  5. If you
@hertz1
hertz1 / removerAcentos.js
Last active August 20, 2024 12:44
Função simples e eficiente para remover todos os tipos de acentos da língua portuguesa.
/**
* Remove acentos de strings
* @param {String} string acentuada
* @return {String} string sem acento
*/
var map={"â":"a","Â":"A","à":"a","À":"A","á":"a","Á":"A","ã":"a","Ã":"A","ê":"e","Ê":"E","è":"e","È":"E","é":"e","É":"E","î":"i","Î":"I","ì":"i","Ì":"I","í":"i","Í":"I","õ":"o","Õ":"O","ô":"o","Ô":"O","ò":"o","Ò":"O","ó":"o","Ó":"O","ü":"u","Ü":"U","û":"u","Û":"U","ú":"u","Ú":"U","ù":"u","Ù":"U","ç":"c","Ç":"C"};
function removerAcentos(s){ return s.replace(/[\W\[\] ]/g,function(a){return map[a]||a}) };
@paulirish
paulirish / bling.js
Last active May 26, 2025 20:31
bling dot js
/* bling.js */
window.$ = document.querySelector.bind(document);
window.$$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function(name, fn) { this.addEventListener(name, fn); };
NodeList.prototype.__proto__ = Array.prototype;
NodeList.prototype.on = function(name, fn) { this.forEach((elem) => elem.on(name, fn)); };
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active June 14, 2025 04:09
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name: