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:22 (UTC -12:00)
View GitHub Profile
@bschaatsbergen
bschaatsbergen / docker-compose.yml
Last active May 20, 2024 07:54
multi-node elasticsearch cluster
version: '2.2'
services:
es01:
image: docker.elastic.co/elasticsearch/elasticsearch:7.12.0
container_name: es01
environment:
- node.name=es01
- cluster.name=es-docker-cluster
- discovery.seed_hosts=es02,es03
- cluster.initial_master_nodes=es01,es02,es03
@sanzoghenzo
sanzoghenzo / compare.py
Last active May 10, 2024 04:25
Compare Excel sheets with Pandas
"""
Compare two Excel sheets
Inspired by https://pbpython.com/excel-diff-pandas-update.html
For the documentation, download this file and type:
python compare.py --help
"""
import argparse
import pandas as pd
"""
Django ORM Optimization Tips
Caveats:
* Only use optimizations that obfuscate the code if you need to.
* Not all of these tips are hard and fast rules.
* Use your judgement to determine what improvements are appropriate for your code.
"""
# ---------------------------------------------------------------------------
@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
@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)
@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"]
@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():
@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
@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
@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\":{}}"]
}