Skip to content

Instantly share code, notes, and snippets.

View RonanFelipe's full-sized avatar
🌴
On vacation

Ronan Felipe RonanFelipe

🌴
On vacation
View GitHub Profile
@marcbelmont
marcbelmont / spotify-ad-muter.user.js
Last active April 22, 2024 10:28
Spotify Ad Muter. Automatically mute (block) Spotify ads. Turn sound on again after the ad.
// ==UserScript==
// @name Spotify Ad Muter
// @version 1.2
// @namespace http://tampermonkey.net/
// @description Detects and blocks ads on Spotify. Automatically mute Spotify ads. Turn sound on again after the ad.
// @match https://*.spotify.com/*
// @grant none
// @run-at document-start
// @downloadURL https://gist.github.com/marcbelmont/1ea63270867a4e8786dd5f172d8d4489/raw
// @updateURL https://gist.github.com/marcbelmont/1ea63270867a4e8786dd5f172d8d4489/raw
@ripiuk
ripiuk / send_table_in_gmail.py
Last active March 4, 2023 02:46
Send HTML table as gmail body in Python
import smtplib
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
SENDER_EMAIL = 'some_email@gmail.com'
SENDER_PASSWORD = 'some_password'
SERVER = 'smtp.gmail.com:587'
RECEIVER_EMAIL = 'receiver_email@gmail.com'
SUBJECT = 'BLA-bla'
@gbaman
gbaman / graphql_example.py
Created November 1, 2017 00:18
An example on using the Github GraphQL API with Python 3
# An example to get the remaining rate limit using the Github GraphQL API.
import requests
headers = {"Authorization": "Bearer YOUR API KEY"}
def run_query(query): # A simple function to use requests.post to make the API call. Note the json= section.
request = requests.post('https://api.github.com/graphql', json={'query': query}, headers=headers)
if request.status_code == 200:
@vasanthk
vasanthk / System Design.md
Last active June 17, 2024 10:07
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?