Skip to content

Instantly share code, notes, and snippets.

View felipecwb's full-sized avatar
🎧
🚀

Felipe Francisco felipecwb

🎧
🚀
View GitHub Profile
@andersevenrud
andersevenrud / alacritty-tmux-vim_truecolor.md
Last active November 13, 2024 05:31
True Color (24-bit) and italics with alacritty + tmux + vim (neovim)

True Color (24-bit) and italics with alacritty + tmux + vim (neovim)

This should make True Color (24-bit) and italics work in your tmux session and vim/neovim when using Alacritty (and should be compatible with any other terminal emulator, including Kitty).

Testing colors

Running this script should look the same in tmux as without.

curl -s https://gist.githubusercontent.com/lifepillar/09a44b8cf0f9397465614e622979107f/raw/24-bit-color.sh >24-bit-color.sh
@felipecwb
felipecwb / fibonacci.js
Last active October 30, 2015 20:28
Fibonacci in Javascript with recursion and cache.
#!/usr/bin/env node
"use strict";
var fibonacci = function fib(n) {
if (typeof fib._cache === 'undefined') {
fib._cache = {};
}
if (fib._cache[n]) {
return fib._cache[n];
}
@janit
janit / gist:32a36c5a1dcbbf6bca5d
Created June 22, 2015 20:26
Example H2O HTTP server configuration for PHP rewrite apps (such as Bolt, WordPress)
# to find out the configuration commands, run: h2o --help
user: www-data
hosts:
"example.com":
listen:
host: xx.xx.xx.xx
port: 443
@felipecwb
felipecwb / pre-commit
Last active August 29, 2015 14:22
My new git pre-commit hook after an outage.
#!/usr/bin/env bash
set -u
CRED="\033[0;31m"
CYELLOW="\033[1;33m"
CBLUE="\033[0;34m"
CGREEN="\033[0;32m"
CCYAN="\033[0;36m"
CDEFAULT="\033[0m"
// by Erik Wrenholt
import java.util.*;
class Mandelbrot
{
static int BAILOUT = 16;
static int MAX_ITERATIONS = 1000;
private static int iterate(float x, float y)
{
@netojoaobatista
netojoaobatista / cielo.sh
Last active November 4, 2020 12:30
Instalação dos certificados Cielo em servidores Linux
#!/bin/bash
if [ $EUID != 0 ]; then
echo 'Você precisa ser root para instalar certificados.'
exit $?
fi
# Diretório onde os certificados serão instalados
cert_path=`openssl version -d|sed 's/.*\"\(.*\)\"/\1/g'`/certs
# Path para o certificado da Cielo
@HenriqueSilverio
HenriqueSilverio / backbone-resources.md
Last active November 17, 2017 12:23
Resources to learn Backbone.js
@dahnielson
dahnielson / UUID.php
Last active September 1, 2024 11:34
Pure PHP UUID generator
<?php
/**
* UUID class
*
* The following class generates VALID RFC 4122 COMPLIANT
* Universally Unique IDentifiers (UUID) version 3, 4 and 5.
*
* UUIDs generated validates using OSSP UUID Tool, and output
* for named-based UUIDs are exactly the same. This is a pure
* PHP implementation.