Skip to content

Instantly share code, notes, and snippets.

# Python 3.4
import curses as cs
import random as rd
import sys
l = []
for i in range(33, 127):
l.append(chr(i))
port = 'áéíóú' 'âêô' 'ãõ' 'à' 'ç'

Keybase proof

I hereby claim:

  • I am pauloromeira on github.
  • I am romeira (https://keybase.io/romeira) on keybase.
  • I have a public key whose fingerprint is B8B4 0FCD 6518 C2E4 A5E5 6EDB 4BAA 59BF 1673 9C18

To claim this, I am signing this object:

@pauloromeira
pauloromeira / tlp
Last active November 9, 2024 08:32
My TLP config file (/etc/default/tlp) for ThinkPad
# ------------------------------------------------------------------------------
# tlp - Parameters for power saving
# See full explanation: http://linrunner.de/en/tlp/docs/tlp-configuration.html
# dir: /etc/default/tlp
# Hint: some features are disabled by default, remove the leading # to enable
# them.
# Set to 0 to disable, 1 to enable TLP.
@pauloromeira
pauloromeira / config_0
Last active February 27, 2022 11:56
Tilda config file
tilda_config_version = "1.3.1"
# command = ""
font = "Monospace 11"
key = "<Primary><Shift>space"
addtab_key = "<Shift><Control>t"
fullscreen_key = "F11"
toggle_transparency_key = "F12"
toggle_searchbar_key = "<Shift><Control>f"
closetab_key = "<Shift><Control>w"
nexttab_key = "<Control>Page_Down"
@pauloromeira
pauloromeira / README-Template.md
Created October 18, 2017 00:44 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@pauloromeira
pauloromeira / montyhall.py
Last active January 1, 2018 04:31
Monty Hall Proof
#!/usr/bin/env python
from random import shuffle
options = [1, 0, 0]
iterations = 1000000
stick = 0
change = 0
@pauloromeira
pauloromeira / gitreplace.sh
Created April 10, 2018 02:29
Replace string in all Git history.
git filter-branch --tree-filter "find . -name '*.*' -exec sed -i '' -e 's/OLDSTRING/NEWSTRING/g' {} \;" -f
@pauloromeira
pauloromeira / vim_compile.sh
Created October 8, 2018 04:54
Vim compile script
cd ~
rm -rf vim
git clone https://github.com/vim/vim.git
# export LD_LIBRARY_PATH=$HOME/.pyenv/versions/3.7.0/lib
# export PATH=$HOME/.pyenv/versions/3.7.0/bin:$PATH
cd vim
./configure --with-features=huge \
--enable-multibyte \
@pauloromeira
pauloromeira / 90-monitor.conf
Last active November 15, 2018 15:45
Ubuntu monitor config for 2560x1080 ultrawide monitors
Section "Monitor"
Identifier "HDMI-2"
Modeline "2560x1080_55.00" 209.98 2560 2720 2992 3424 1080 1081 1084 1115 -HSync +Vsync
EndSection
Section "Screen"
Identifier "Screen0"
Monitor "Monitor-HDMI-2"
DefaultDepth 24
SubSection "Display"
Depth 24
@pauloromeira
pauloromeira / 81-thinkpad-dock.rules
Created January 13, 2019 23:12 — forked from seanf/81-thinkpad-dock.rules
Example ThinkPad docking script for multi-monitor
# Save this file (after modifying ID_VENDOR and ID_MODEL if necessary) as /etc/udev/rules.d/81-thinkpad-dock.rules
# These values seem to work for "ThinkPad Mini Dock Plus Series 3"
SUBSYSTEM=="usb", ACTION=="add|remove", ENV{ID_VENDOR}=="17ef", ENV{ID_MODEL}=="100a", RUN+="/etc/sbin/thinkpad-dock.sh"