Skip to content

Instantly share code, notes, and snippets.

View chicolucio's full-sized avatar
:atom:

Francisco B. chicolucio

:atom:
View GitHub Profile
@vindard
vindard / ascii_art.py
Last active May 4, 2020 17:43
Refactored code based on this repo (https://github.com/homeless-field/ascii_art)
import sys
from PIL import Image
# Setup image
img_orig = Image.open("ctycgchr36231.jpg")
scale = 3
w, h = img_orig.width, img_orig.height
image = img_orig.resize( (w//scale, h//scale) )
single_input::= NEWLINE | simple_stmt | compound_stmt NEWLINE
file_input::= (NEWLINE | stmt)* ENDMARKER
eval_input::= testlist NEWLINE* ENDMARKER
decorator::= '@' dotted_name ( '(' (arglist)? ')' )? NEWLINE
decorators::= decorator+
decorated::= decorators (classdef | funcdef | async_funcdef)
async_funcdef::= ASYNC funcdef
funcdef::= 'def' NAME parameters ('->' test)? ':' (TYPE_COMMENT)? func_body_suite
@tinogomes
tinogomes / DNS_TO_LOCALHOST.markdown
Last active June 29, 2024 06:45
Public DNS Pointing to localhost (127.0.0.1)

Available Public Wildcard DNS Domains pointing to localhost (127.0.0.1)

The best way to safely and securely use local domains pointing to 127.0.0.1 is to edit your local settings (/etc/hosts) and add your own settings. Keep in mind if you want to use subdomains, you need to enter all variations.

Example:

# Adding bottom of your current file /etc/hosts
################# MY LOCAL DOMAINS
127.0.0.1 local.com admin.local.com
127.0.0.1 domain1.com
@mjnaderi
mjnaderi / install-arch.md
Last active June 28, 2024 20:21 — forked from mattiaslundberg/arch-linux-install
Installing Arch Linux with Full Disk Encryption (LVM on LUKS)

Installing Arch Linux with Full Disk Encryption

If you're aiming for a seamless Arch Linux installation in UEFI mode, follow along as this guide will walk you through the process step by step. We'll be using LUKS (Linux Unified Key Setup) and LVM (Logical Volume Manager) partitions on LUKS to achieve full disk encryption.

Note: I have updated this doc for UEFI mode. For those with BIOS/MBR systems, you can refer to the previous version, but keep in mind that it might be outdated and no longer accurate.

If you're only interested in installing Linux and not setting up dual boot with Windows, feel free to skip the Windows-related sections.

@tinogomes
tinogomes / gist:7ca162a0110be69a4a64
Last active July 14, 2023 22:12
Frases - Porta dos Fundos - Mundo dos Negócios

https://www.youtube.com/watch?v=cPbl26Fw-dk

  • Quer brincar de Eike Bastista nessa porra!
  • Matar um leão por dia.
  • Faca nos dentes
  • Sangue no olho
  • É matar ou morrer
  • Dando muque em macaco de gaveta
  • É largar mato na caçamba
  • Jogar terra na boca de carrapato
@rdeavila
rdeavila / git-update-fork.sh
Last active June 28, 2024 13:53
Git: como atualizar um fork com as mudanças do original?
#!/bin/bash
# Adicione um novo remote; pode chamá-lo de "upstream":
git remote add upstream https://github.com/usuario/projeto.git
# Obtenha todos os branches deste novo remote,
# como o upstream/master por exemplo:
git fetch upstream
@Rhomboid
Rhomboid / example.py
Created July 14, 2013 17:21
Very simple lexer/parser for chemical formula
import re
atomic_mass = {
"H": 1.0079, "He": 4.0026, "Li": 6.941, "Be": 9.0122,
"B": 10.811, "C": 12.011, "N": 14.007, "O": 15.999, "F": 18.998,
"Ne": 20.180, "Na": 22.990, "Mg": 24.305, "Al": 26.982,
"Si": 28.086, "P": 30.974, "S": 32.065, "Cl": 35.453,
"Ar": 39.948, "K": 39.098, "Ca": 40.078, "Sc": 44.956,
"Ti": 47.867, "V": 50.942, "Cr": 51.996, "Mn": 54.938,
"Fe": 55.845, "Co": 58.933, "Ni": 58.693, "Cu": 63.546,