Skip to content

Instantly share code, notes, and snippets.

@fpgaminer
fpgaminer / taxtest.py
Last active September 12, 2021 21:07
import sys
# The way this worksheet seems to work is:
# A = taxes you would pay if it was just income
# B = calculate taxes on capital gains, using the capital gains tax rate schedule, BUT skip the first X dollars of the rate schedule, where X is your income
# total taxes = A + B
def income_tax (amt):
taxes = 0.0
lower_end = 0
@fpgaminer
fpgaminer / unsplash_wallpaper.sh
Created November 7, 2016 03:15
Downloads a random image from Unsplash and sets the wallpaper every so often (currently only works with Gnome/Unity/Cinnamon/etc)
#!/bin/sh
while :
do
wget -q -O unsplash_wallpaper.jpg https://unsplash.it/1920/1080/?random
gsettings set org.gnome.desktop.background picture-uri file://$PWD/unsplash_wallpaper.jpg
sleep 1h # Change this if you want a different update frequency (e.g. 30m, 12h, 24h, etc...).
done