Skip to content

Instantly share code, notes, and snippets.

View rodrigoSyscop's full-sized avatar
🇧🇷
¯\_(ツ)_/¯

Rodrigo Vieira rodrigoSyscop

🇧🇷
¯\_(ツ)_/¯
  • Curitiba - PR
View GitHub Profile
@ericdouglas
ericdouglas / keyboard.md
Last active July 2, 2024 19:49
Cedilla under C (ç) in 'US international' keyboard layout in Linux

Add English (US, alt. intl.)

It's because the cedilla module isn't loaded by default when the locale is set to en, so you have to change the configuration files for gtk to add them:

  1. Edit configuration files:
sudo vim /usr/lib/x86_64-linux-gnu/gtk-3.0/3.0.0/immodules.cache

sudo vim /usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/immodules.cache
@guilhermednt
guilhermednt / check_intermedium_private_key_leak.sh
Created May 9, 2018 23:08
Verifying Banco Intermedium's private key leak
# Today the twitter user @ayubio said he had received the private key for a Brazillian bank's HTTPS certificate:
# - https://twitter.com/ayubio/status/994260981294469120
# - https://twitter.com/ayubio/status/994262029929246722
# - https://twitter.com/ayubio/status/994277992351391744
# To prove he actualy had the key, another user asked him to sign a message with such key and so he did:
# - http://pastebin.xyz/p?q=bXllODA
# The commands bellow will check that signature
# Store the message in a file (tweet.txt) in the same way @ayubio did:

cd ~/Downloads

wget http://repo.zabbix.com/zabbix/3.2/ubuntu/pool/main/z/zabbix-release/zabbix-release_3.2-1+xenial_all.deb

dpkg -i zabbix-release_3.2-1+xenial_all.deb

apt-get update

should add /etc/apt/sources.list.d/zabbix.list

from concurrent.futures import as_completed, ThreadPoolExecutor
from urllib.request import urlopen
import re
import sys
DEFAULT_REGEX = r'<input type="text" id="nacional" value="([^"]+)"/>'
CURRENCY = {
'dolar': 'http://dolarhoje.com/',
'euro': 'http://eurohoje.com/',
@Kartones
Kartones / postgres-cheatsheet.md
Last active July 2, 2024 22:38
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@robap
robap / routing.php
Created November 6, 2011 13:21
A routing file for use with php built in web-server
<?php
//Name this file .routing.php and place in webroot
//originally written by Ralph Schindler http://news.php.net/php.internals/53870
//If using zf, this is a convenient place to define the dev environment
define('APPLICATION_ENV', 'development');
//If the file exists or is an obvious static resource, do nothing by returning false.
//Route all other requests through index.php.
if ( preg_match('/\.(?:png|jpg|jpeg|gif|ico)$/', $_SERVER['REQUEST_URI']) ||