Skip to content

Instantly share code, notes, and snippets.

@luisfavila
luisfavila / amazon_money_spent.md
Created July 2, 2022 00:14
Calculate money spent on amazon

This script calculates your spent on amazon. Follow the instructions and run on the console of your browser's inspector tools. Currently supports € and £, calculates in POUNDS. Make sure to update the exchange rate.

  1. Navigate to https://www.amazon.co.uk/cpe/yourpayments/transactions
  2. Open developer tools, go to console and run:
function sumCurrentPage() {
  const table = $('.a-box-inner.a-padding-none'); 
  return Array
    .from(table.querySelectorAll('.a-column:nth-of-type(2) > span'))
@luisfavila
luisfavila / twitch_money_spent.md
Last active July 1, 2022 20:53
Calculate money spent on twitch

This script calculates your spent on twitch. Follow the instructions and run on the console of your browser's inspector tools. Currently supports €. Change it if your currency differs.

  1. Navigate to https://www.twitch.tv/wallet?tab=purchase-history
  2. Make sure the date range covers the period you want to calculate the spent on
  3. Open developer tools, go to console and run:
function sumCurrentPage(table) {
  return Array
    .from(table.querySelectorAll(".tw-table-cell:nth-of-type(4) > * p.CoreText-sc-cpl358-0"))
@luisfavila
luisfavila / light.py
Last active February 19, 2021 18:53 — forked from ybarigou/light.py
Flux_led corrected bug fixes - hassio and Google Home/Alexa interactions - https://www.buymeacoffee.com/ybarigou
"""Support for Flux lights."""
import logging
import random
###
# Added for MagicLight hack
import time
from flux_led import BulbScanner, WifiLedBulb
import voluptuous as vol
@luisfavila
luisfavila / install_rspamd.sh
Last active October 15, 2018 12:47
Install rspamd ubuntu
CODENAME=`lsb_release -c -s`
wget -O- https://rspamd.com/apt-stable/gpg.key | apt-key add -
echo "deb http://rspamd.com/apt-stable/ $CODENAME main" > /etc/apt/sources.list.d/rspamd.list
echo "deb-src http://rspamd.com/apt-stable/ $CODENAME main" >> /etc/apt/sources.list.d/rspamd.list
apt-get update
apt-get -q -y --no-install-recommends install rspamd

Keybase proof

I hereby claim:

To claim this, I am signing this object: