Skip to content

Instantly share code, notes, and snippets.

View tofran's full-sized avatar
🌴
Vacationing

Francisco Marques tofran

🌴
Vacationing
View GitHub Profile
# Go thru all vercel projects in any of your organizatons and remove the development "target"
# from all secrets that have other targets
import requests
VERCEL_TOKEN = "YOUT_TOKEN"
HEADERS = {"Authorization": f"Bearer {VERCEL_TOKEN}"}
BASE_API_URL = "https://api.vercel.com"
@tofran
tofran / Download_bolt_invoices.py
Last active April 1, 2024 00:01
Bolt business invoice downloader
import csv
import requests
from datetime import datetime
def download_and_save_invoice(url, date_str):
response = requests.get(url)
response.raise_for_status()
file_name = f"ride_{date_str}.pdf"
@tofran
tofran / python-webbrowser-bypass.sh
Last active January 29, 2024 20:53
Simle utility to fake Python's `webbroser` and be able to bypass code that relies on it when there's no browser on the system.
#!/bin/sh
#
# Simle utility to fake Python's `webbroser` (https://docs.python.org/3/library/webbrowser.html).
# Usefull for when no GUI is available. For example inside a Docker container.
#
# Copy paste this code the terminal:
export BROWSER="~/fake-browser.sh:$BROWSER"
echo 'echo "Fake browser called with: $@" && touch ~/fake-browser.log && echo "$@" >> ~/fake-browser.log' > ~/fake-browser.sh
COMMUNICATION_SERVICES_CONNECTION_STRING=
EMAIL_SENDER=
@tofran
tofran / nbt-copy.py
Created December 26, 2020 00:34
Copy minecraft NBT properties from one file into another
#!/usr/bin/env python3
# Copy minecraft NBT properties from one file into another
# Usage:
# ./nbt-copy.py <source_file> <destination_file> <property> [properties]
#
# Requires nbt:
# pip install nbt
import argparse
@tofran
tofran / iLoConsoleShortcut.js
Created April 19, 2020 18:55
Userscript to add a shortcut to the HTML5 console in HP's iLo UI
// ==UserScript==
// @name HP iLo 4 console shortcut
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Adds a quick link to the HTML5 console in HP's iLo UI. Make sure you match the script to your server(s) IPs
// @author tofran
// @match https://<YPUR_SERVER_IP_HERE>/html/masthead.html
// @grant none
// ==/UserScript==
const findCacheDir = require('find-cache-dir');
const Cache = require("file-system-cache").default;
const cache = Cache({
basePath: findCacheDir({ name: 'storybook' }),
ns: 'storybook'
});
const cache_data = {
success: true,
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
I do not have access to my key 😨 80E0 1323 761F 16F4 2DBD 15A4 59BC 6A70 DDCC 3562 .
What happened: I was relying on keybase to manage my keys but unfortunately I do not have the password. I thought that having the paper wallet was enough to use keybase - looks like it unlocks the account but not the keys. I may be able to regain access to my password, but not in the near future, since is in my desktop, which I currently have no access.
So I present you, to my new keyFA4C 287B CB95 2CE1 5DBB 9D4F 242D 60F3 75F3 12C9
I have also signed a proof @github, you can find it here . Sory for the inconvenience.
-----BEGIN PGP SIGNATURE-----
iQIcBAEBCAAGBQJa1n0RAAoJECQtYPN18xLJnSwP/R7sS9nkSJpbqUbWosaPhaR4
@tofran
tofran / Album sorter
Last active September 29, 2016 22:00
Sort facebook albuns by likes, extremelly buggy, but it kinda works (make sure the album is fully loaded). 💩 #PoopCodeAlert
// ==UserScript==
// @name Album sorter
// @namespace tofran.com
// @version 0.1
// @description Sort facebook albuns by likes, extremelly buggy, but it works (make sure the album is fully loaded)
// @author tofran
// @match https://www.facebook.com/*/photos/?tab=album&album_id=*
// @grant none
// @require http://code.jquery.com/jquery-latest.js
// ==/UserScript==

Keybase proof

I hereby claim:

  • I am tofran on github.
  • I am tofran (https://keybase.io/tofran) on keybase.
  • I have a public key whose fingerprint is 80E0 1323 761F 16F4 2DBD 15A4 59BC 6A70 DDCC 3562

To claim this, I am signing this object: