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
@vasanthk
vasanthk / System Design.md
Last active November 14, 2024 11:31
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?
@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:
@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 = '[email protected]'
SENDER_PASSWORD = 'some_password'
SERVER = 'smtp.gmail.com:587'
RECEIVER_EMAIL = '[email protected]'
SUBJECT = 'BLA-bla'
@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