Skip to content

Instantly share code, notes, and snippets.

View callaars's full-sized avatar
🏠
Working from home

Joseph Callaars callaars

🏠
Working from home
View GitHub Profile
/**
* Some banks allow you to overpay a certain percentage per year on the remaining balance on the start
* of the year. None of the amortisation calculators I could find allowed me to figure out the percentage
* of the balance per annum, hence I created this function.
*/
function displayAmortizationWithOverpayment(
principal,
monthlyPayment,
annualRate,
// ==UserScript==
// @name 4chan Thread Image Downloader
// @namespace https://github.com/yeriomin
// @downloadURL https://raw.githubusercontent.com/yeriomin/4chan-image-downloader/master/4chan-image-downloader.js
// @updateURL https://raw.githubusercontent.com/yeriomin/4chan-image-downloader/master/4chan-image-downloader.js
// @version 1.0
// @description Downloads all images in a thread or the images of the highlighted poster packs them into an archive and presents to the user
// @author yeriomin, callaars
// @match http://boards.4chan.org/*/thread/*
// @match https://boards.4chan.org/*/thread/*
import React, { useCallback, useState } from "react";
type SetRefreshPropsProps = {
isRefreshing: boolean;
onRefresh: () => void;
};
export const AndroidRefreshControlContext = React.createContext({
isRefreshing: false,
onRefresh: () => {},

Blueprint book string

Collection of belt balancers. These balancers could originally be found on the wiki, now there are hosted here and on factorioprints.com.

Includes:

  • 12 to 4 throughput unlimited (all belt colors)
  • 12 to 6 (blue belt)
  • 12 to 12 (all belt colors)
  • 16 to 16 inline (blue belt)
  • 16 to 16 throughput unlimited (all belt colors)
@callaars
callaars / keybase.md
Created July 2, 2019 10:44
keybase.md

Keybase proof

I hereby claim:

  • I am callaars on github.
  • I am callaars (https://keybase.io/callaars) on keybase.
  • I have a public key whose fingerprint is 76C3 E007 7669 510F ECE4 78CF CCC7 0AC8 9357 D6D4

To claim this, I am signing this object:

@callaars
callaars / challenge1.txt
Created January 8, 2018 16:00
Code Challenge Week #1
Given the root to a binary tree, implement serialize(root), which serializes the tree into a string, and deserialize(s), which deserializes the string back into the tree.
@callaars
callaars / convert_video.sh
Last active December 7, 2017 16:17
Convert videos in the directory above to the current directory
#!/bin/bash
i=0
contains() {
@callaars
callaars / recipe.md
Created December 19, 2015 11:07
Scotch Egg Recipe

Recipe for Scotch Eggs

  1. Boil egg for 6 minutes
  2. Put egg in ice bath
  3. Sausage meat with green onion, garlic, mustard, salt and pepper
  4. Peel the fucking egg
  5. Douce the egg in flour
  6. Wrap the egg in the sausage meat
  7. Put the ball in flour
  8. Now in beaten egg

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@callaars
callaars / keybase.md
Created February 1, 2015 12:57
keybase.md

Keybase proof

I hereby claim:

  • I am bcallaars on github.
  • I am callaars (https://keybase.io/callaars) on keybase.
  • I have a public key whose fingerprint is A9CF 9B5F 16EA 3BF8 246B 1CDA 81C0 03F0 623B DFE5

To claim this, I am signing this object: