Skip to content

Instantly share code, notes, and snippets.

@arssher
arssher / basic
Last active January 23, 2026 07:38
vovsu donimaet
ars@nonlibrem ~ $ mortage.py -y 30 --mortage-payment 71946 -i 6 -r 60000 -s 1 --renovation 2000000 --down-payment 3000000 --loan 12000000
30
inflation factor: 0.0600, skip years: 1, loan: 12000000, down_payment: 3000000, renovation: 2000000
year 0: monthly payment_i_a=71946.00, payment_sum_i_a=863352.00, payment_sum=863352.00, debt=11852639.37, debt_i_a=11181735.26, monthly rental=60000.00, rental_sum=0.00, yearly b=-863352.00, b=-863352.00, full_b=-2863352.00, rental profit=0.00, investments=5863352.00, owned_value=3818264.74, assets=3818264.74, CAGR=-34.88%
year 1: monthly payment_i_a=67873.58, payment_sum_i_a=1677835.02, payment_sum=1726704.00, debt=11696189.86, debt_i_a=10409567.34, monthly rental=60000.00, rental_sum=720000.00, yearly b=-94483.02, b=-957835.02, full_b=-2957835.02, rental profit=0.00, investments=5957835.02, owned_value=4590432.66, assets=4590432.66, CAGR=-12.22%
year 2: monthly payment_i_a=64031.68, payment_sum_i_a=2446215.23, payment_sum=2590056.00, debt=11530090.89, debt_i_a=9680886.65
@artizirk
artizirk / fix_maildir_mail_mtime.py
Created April 23, 2019 15:30
This script is useful for setting fallback mtime for isync/mbsync CopyArrivalDate option
#!/usr/bin/env python3
# This script is useful for setting fallback mtime for isync/mbsync CopyArrivalDate option
# If you use notmuch then you could do something like this to fix mtime on new mail
# notmuch search --output=files tag:new | xargs -P0 -i ~/code/mailutils/fix_maildir_mtime.py {}
import email
import sys
import os
from email.utils import parsedate_tz, mktime_tz
@jaytaylor
jaytaylor / .psqlrc
Created January 6, 2015 17:37
My .psqlrc file.
-- Found at:
-- http://www.if-not-true-then-false.com/2009/postgresql-psql-psqlrc-tips-and-tricks/
-- http://opensourcedbms.com/dbms/psqlrc-psql-startup-file-for-postgres/
\set QUIET ON
\pset pager always
\pset null 'NULL'