Skip to content

Instantly share code, notes, and snippets.

View athossampayo's full-sized avatar
:octocat:

Athos Sampayo athossampayo

:octocat:
View GitHub Profile
@athossampayo
athossampayo / decrypt_dbeaver.py
Last active January 24, 2024 14:17 — forked from felipou/decrypt_dbeaver.py
DBeaver password decryption script
# https://stackoverflow.com/questions/39928401/recover-db-password-stored-in-my-dbeaver-connection
# requires pycryptodome lib (pip install pycryptodome)
import sys
import base64
import os
import json
from Crypto.Cipher import AES
@athossampayo
athossampayo / delete_files.py
Created February 8, 2023 20:47
Python boto3 S3 Snippets
import boto3
s3_client = boto3.resource('s3')
my_bucket = s3_client.Bucket('bucket')
files_list = [object_summary for object_summary in my_bucket.objects.filter(Prefix='path/to/dir')]
for object_summary in files_list:
print(object_summary.key)
object_summary.delete()
@athossampayo
athossampayo / download_br_ms_cnes_updated.md
Created March 29, 2022 18:33
Instructions to solve the old code to download CNES dataset and be able to convert it from proprietary DBC extension.

How to download and process br_ms_cnes data UPDATED

  1. Python script to download all DBC files. Might be better to edit to use ftplib in place of wget.
    from datetime import date, timedelta
    
    import wget
    import ftplib
@athossampayo
athossampayo / DefaultKeyBinding.dict
Last active March 9, 2022 14:47 — forked from trusktr/DefaultKeyBinding.dict
My DefaultKeyBinding.dict for Mac OS BigSur 11.6.4
/* ~/Library/KeyBindings/DefaultKeyBinding.Dict
This file remaps the key bindings of a single user on Mac OS X 10.5 to more
closely match default behavior on Windows systems. This makes the Command key
behave like Windows Control key. To use Control instead of Command, either swap
Control and Command in Apple->System Preferences->Keyboard->Modifier Keys...
or replace @ with ^ in this file.
Here is a rough cheatsheet for syntax.
Key Modifiers
@athossampayo
athossampayo / stylus-2020-10-19.json
Created October 19, 2020 17:21
TweetDeck CSS for Stylus (https://github.com/openstyles/stylus) to make first collumn fill the screen
[
{
"enabled": true,
"updateUrl": null,
"md5Url": null,
"url": null,
"originalMd5": null,
"installDate": 1603124659985,
"name": "tweetdeck.twitter.com",
"sections": [