Skip to content

Instantly share code, notes, and snippets.

View tonio-m's full-sized avatar
🦝

Marco Vieira tonio-m

🦝
View GitHub Profile
@tonio-m
tonio-m / databricks_repl.py
Created December 6, 2024 19:18
create a repl inside a databricks cluster. for terminal development
from prompt_toolkit import prompt
from databricks.sdk import WorkspaceClient
from databricks.sdk.service import compute
w = WorkspaceClient()
cluster_id = 'existing-cluster-id'
new_context = w.command_execution.create(cluster_id=cluster_id, language=compute.Language.python).result()
while True:
@tonio-m
tonio-m / discord_hide_tweets.sh
Created December 6, 2024 15:03
violentmonkey userscript to hide tweets. If you have friends that spend all day scrolling and still want to spend time with them.
// ==UserScript==
// @name Discord Mute Word Hider
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Hide Discord chat messages containing mute words
// @author tonio-m
// @match *://discord.com/*
// @grant none
// ==/UserScript==
@tonio-m
tonio-m / heatmap_calendar.py
Created June 19, 2024 14:04
Quick script I wrote to get a heatmap calendar from my obsidian journal where I log my habits. Saving it here just because.
import datetime
import calendar
import argparse
from pprint import pprint
def read_properties(filepath,delimiter='---\n'):
properties = {}
cur_line = None
with open(filepath) as f:
.header on
.mode column
PRAGMA foreign_keys = ON;
CREATE TABLE customers (
id INTEGER PRIMARY KEY,
years_tenure REAL,
state TEXT,
clv REAL
);
@tonio-m
tonio-m / chord_exercise.txt
Last active June 6, 2023 20:53
Practice all chords with only one exercise. (At least all major and minor 2-5-1 chord progressions)
Dmin7 G7 Cmaj7 Fmaj7 Bmin7♭5 E7 Amin7
Gmin7 C7 Fmaj7 B♭maj7 Emin7♭5 A7 Dmin7
Cmin7 F7 B♭maj7 E♭maj7 Amin7♭5 D7 Gmin7
Fmin7 B♭7 E♭maj7 A♭maj7 Dmin7♭5 G7 Cmin7
B♭min7 E♭7 A♭maj7 D♭maj7 Gmin7♭5 C7 Fmin7
E♭min7 A♭7 D♭maj7 G♭maj7 Cmin7♭5 F7 B♭min7
A♭min7 D♭7 G♭maj7 C♭maj7 Fmin7♭5 B♭7 E♭min7
C#min7 F#7 Bmaj7 Emaj7 B♭min7♭5 E♭7 A♭min7
F#min7 B7 Emaj7 Amaj7 D#min7♭5 G#7 C#min7
Bmin7 E7 Amaj7 Dmaj7 G#min7♭5 C#7 F#min7
@tonio-m
tonio-m / all_aws_actions.txt
Created March 31, 2022 19:51
All AWS actions for all services to help you build your roles. Use ctrl+f to find what you want. Ripped from: https://awspolicygen.s3.cn-north-1.amazonaws.com.cn/policygen.html
access-analyzer:ApplyArchiveRule
access-analyzer:CancelPolicyGeneration
access-analyzer:CreateAccessPreview
access-analyzer:CreateAnalyzer
access-analyzer:CreateArchiveRule
access-analyzer:DeleteAnalyzer
access-analyzer:DeleteArchiveRule
access-analyzer:GetAccessPreview
access-analyzer:GetAnalyzedResource
access-analyzer:GetAnalyzer
@tonio-m
tonio-m / chords_and_scales.txt
Last active September 9, 2022 02:31
Quick hack for me to remember chords, scales, and modes
Chords
------------------9th|-11th|-13th
major: 3 - 2 - 3 - 2 | - 2 | - 3
minor: 2 - 3 - 2 - 3 | - 2 | - 3
--------------------------------
sus2: 1 - 4 (remove 3rd, add 9th transposed down)
sus4: 4 - 1 (remove 3rd, add 11th transposed down)
--------------------------------
dim: 2 - 2 - 2
dom: 3 - 2 - 2
@tonio-m
tonio-m / camera_filenames.txt
Last active May 16, 2023 18:50
Camera naming conventions for video files. Try searching youtube for something like "GOPR1234"
x = number e.g. 0001, 1234, etc
MOVxxxx
IMGxxxx
DSCxxxx
AMBAxxxx
SAMxxxx
GH01xxxx
GOPRxxxx
3D_Lxxxx
@tonio-m
tonio-m / unhide_files_mount_iso_wine.sh
Created January 29, 2022 01:29
If you're having issues using a .exe inside an .iso on wine. or with .iso in general, you might have to unhide some files!!!
# unhide files from Reaktor 6 monark installation iso
sudo mount -o unhide Monark.iso monark
@tonio-m
tonio-m / yabridge-setup.sh
Created December 3, 2021 00:09
script to install yabridge and configure your windows vst plugins on linux
sudo pacman -S wine-staging
yay -S yabridge
# make the commonly used folders for vst plugins
mkdir -p "$HOME/.wine/drive_c/Program Files/Steinberg/VstPlugins"
mkdir -p "$HOME/.wine/drive_c/Program Files/Common Files/VST2"
mkdir -p "$HOME/.wine/drive_c/Program Files/Common Files/VST3"
# Add them to yabridge
yabridgectl add "$HOME/.wine/drive_c/Program Files/Steinberg/VstPlugins"