Skip to content

Instantly share code, notes, and snippets.

View n1lux's full-sized avatar
🎯
Focusing

Nilo Alexandre Pereira n1lux

🎯
Focusing
  • Grupo Boticário
  • Poços de Caldas - MG
  • 20:01 (UTC -12:00)
View GitHub Profile
@andreyvit
andreyvit / tmux.md
Created June 13, 2012 03:41
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@igorcosta
igorcosta / cpf_cnpj_validator
Created June 26, 2014 19:13
Regex para validar CPF e CNPJ
Para CPF
/^\d{3}\.\d{3}\.\d{3}\-\d{2}$/
Para CNPJ
/^\d{2}\.\d{3}\.\d{3}\/\d{4}\-\d{2}$/
Para ambos ao mesmo tempo
@kid1412-net
kid1412-net / setting.md
Created August 20, 2015 09:04
[calibre] ePub to PDF converting setting

Note: Use this setting in calibre to convert an ePub file to a printing PDF file

Look and Feel

  • Text justification: Justify text

Page Setup

  • Left: 72 pt.
  • Top: 72 pt.
  • Right: 34 pt.
  • Bottom: 72 pt.
@njh
njh / auto_select_certificate.json
Created December 22, 2015 11:06
Policy file to configure Chrome/Chromium to automatically select a client certificate (useful for Kiosk mode)
{
"AutoSelectCertificateForUrls": ["{\"pattern\":\"*\",\"filter\":{}}"]
}
@masiuchi
masiuchi / provision.sh
Last active December 12, 2022 15:07
Install Docker and Docker Compose to Ubuntu 14.04 LTS.
#!/bin/bash
# https://docs.docker.com/engine/installation/linux/ubuntulinux/
sudo apt-get update
sudo apt-get -y install apt-transport-https ca-certificates
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
sudo bash -c 'echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" > /etc/apt/sources.list.d/docker.list'
sudo apt-get update
sudo apt-get -y install linux-image-extra-$(uname -r)
sudo apt-get -y install docker-engine
@notdodo
notdodo / install_printer
Last active June 15, 2024 06:35
Install a printer on Arch Linux with cups using command line
#!/bin/bash
################################################################
# Install a printer on Arch Linux with cups using command line #
# Used for a HP PSC 1510 with default driver #
################################################################
sudo pacman -S cups
sudo systemctl start org.cups.cupsd
@lucadealfaro
lucadealfaro / default.py
Last active May 8, 2019 15:05
A shopping cart implementation using vue.js, stripe, and web2py
# -*- coding: utf-8 -*-
# this file is released under public domain and you can use without limitations
# -------------------------------------------------------------------------
# Sample shopping cart implementation.
# -------------------------------------------------------------------------
import traceback
def index():
@mmautner
mmautner / Dockerfile
Created December 17, 2017 07:05
celery docker-compose example
FROM python:3.4
ADD . /app/
WORKDIR /app/
RUN pip install -r requirements.txt
CMD ["echo", "hello"]
@MalloyDelacroix
MalloyDelacroix / PyQt5WindowChangeExample.py
Last active July 4, 2023 09:05
A PyQt5 example of how to switch between multiple windows.
import sys
from PyQt5 import QtCore, QtWidgets
class MainWindow(QtWidgets.QWidget):
switch_window = QtCore.pyqtSignal(str)
def __init__(self):
QtWidgets.QWidget.__init__(self)
@zanshin
zanshin / i3 config
Created April 24, 2018 17:27
i3-gaps and Polybar configurations
# i3 config file (v4)
#
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
# Some colors
# Argonaut colors
# Black / Bright Black
set $color0 #232323
set $color8 #444444