Skip to content

Instantly share code, notes, and snippets.

German Denkmal tax claims calculator

This is a very basic service object for calculating the potential tax savings for money spent on a Denkmal protected real-estate. It does nothing fancy and takes two inputs for the calculation. The calculation itself is very basic and is meant to be only a rough guide. There might be special considerations that need to be added.

class DenkmalTaxSavingsCalculator
  TAX_BRACKETS = [
    { limit: 11600, rate: 0.0 },
@leewaa
leewaa / README.md
Created December 9, 2023 13:01 — forked from jesster2k10/README.md
JWT Auth + Refresh Tokens in Rails

JWT Auth + Refresh Tokens in Rails

This is just some code I recently used in my development application in order to add token-based authentication for my api-only rails app. The api-client was to be consumed by a mobile application, so I needed an authentication solution that would keep the user logged in indefinetly and the only way to do this was either using refresh tokens or sliding sessions.

I also needed a way to both blacklist and whitelist tokens based on a unique identifier (jti)

Before trying it out DIY, I considered using:

@leewaa
leewaa / rubymotion-specs.md
Created May 21, 2014 08:40
A small post about how I had been using rspec for rubymotion incorrectly and how it works properly.

Rubymotion notes

Testing

This line should be added to the app delegate didLaunchWithOptions method

class AppDelegate
  def application(application, didFinishLaunchingWithOptions:launchOptions)
 return true if RUBYMOTION_ENV == 'test'
@leewaa
leewaa / gist:6864803
Last active December 24, 2015 21:19
iOS Resources mentioned at Macoun