Skip to content

Instantly share code, notes, and snippets.

@tadly
tadly / pacaur_install.sh
Last active August 30, 2023 13:15
A simple shell script to quickly / easily install "pacaur" on archlinux
#!/bin/sh
#
# !!! IMPORTANT !!!
# As of 2017-12-14, pacaur is unmaintained (https://bbs.archlinux.org/viewtopic.php?pid=1755144#p1755144)
# For alternatives see the arch wiki: https://wiki.archlinux.org/index.php/AUR_helpers#Active
# pacaur seems to get occasional updates to fix breaking changes due to pacman updates though.
#
# If you are new to arch, I encourage you to at least read and understand what
# this script does befor blindley running it.
# That's why I didn't make a one-liner out of it so you have an easier time
@raadk
raadk / excelFinance.R
Last active September 11, 2023 10:01
Excel's PMT, IPMT, PPMT implemented in R
#' Excel: PMT (should make result data frame, but need to change propertyAnalysis())
#'
#' Returns the payment amount for a loan based on a constant interest rate and a constant payment schedule.
#' The payment returned by PMT includes principal and interest but no taxes,
#' reserve payments, or fees sometimes associated with loans.
#' Outgoing payments are displayed by negative numbers and
#' incoming payments by positive numbers.
#' #http://support2.microsoft.com/kb/214005#appliesto
#' @param rate Required. The interest rate per period. Needs to be defined as the same periods as nper.
#' @param per Required. The period for which you want to find the interest and must be in the range 1 to nper.
@ngsmrk
ngsmrk / sidekiq_monitoring
Created August 11, 2014 11:51
Sidekiq queue checking via rails console
stats = Sidekiq::Stats.new
stats.queues
stats.enqueued
stats.processed
stats.failed