Skip to content

Instantly share code, notes, and snippets.

@lenalebt
lenalebt / KotlinSupportImpl.kt
Created March 25, 2024 14:29
kotlin support for google guice
package com.google.inject
import com.google.inject.internal.Errors
import com.google.inject.internal.KotlinSupportInterface
import java.lang.reflect.Constructor
import java.lang.reflect.Field
import java.lang.reflect.Method
import java.util.function.Predicate
import kotlin.reflect.full.declaredFunctions
import kotlin.reflect.full.declaredMemberProperties
@lenalebt
lenalebt / README.md
Last active January 11, 2024 02:55
"Rollover Daily Todos" for Obsidian Templater

Rollover Daily Todos for Obsidian, but with the Templater Plugin

Rollver daily todos is a really nice extension for Obsidian.md that takes TODOs from yesterdays daily notes and rolls them over to today's notes. It has support for Obsidians built-in templates, but does - to my understanding - not really work well with the Templater Plugin. At least, I was unable to get it to work :-). Also, I wished it had some way to tell me that TODOs have been rolled over a few times already. Doing it this way is my way of working around these limitations.

I took some of the code of that "rollover daily todos" plugin and made it into a templater user script.

@lenalebt
lenalebt / .bashrc
Last active March 14, 2020 14:40
How to build a temporary context for taskwarrior
#I added a temporary context for taskwarrior using some bash commands and aliases.
#Here I show how it works.
#
#I wanted my bash prompt to show my temporary context, and I wanted that temporary context to be easily set and reset.
#you may find this at /usr/share/bash-completion/completions instead of in your home directory
source ~/.bash_completion.d/task.sh
alias task='task $DEFAULT_TASK_OPTIONS'
#short for task add, automatically marking it as something new ("inbox") and for something not work-related
@lenalebt
lenalebt / DefaultKeyBinding.dict
Created December 18, 2019 06:59
How to use a typical Linux / Windows Keybindung on MacOS (tested with 10.15.2 Catalina)
/*
PUT THIS FILE IN ~/Library/KeyBindings/DefaultKeyBinding.dict
This file remaps the key bindings of a single user on Mac OS X 10.5 to more closely
match default behavior on Windows systems. This particular mapping assumes
that you have also switched the Control and Command keys already.
This key mapping is more appropriate after switching Ctrl for Command in this menu:
Apple->System Preferences->Keyboard & Mouse->Keyboard->Modifier Keys...->
Change Control Key to Command
Change Command key to Control
/*
Copyright 2014 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
@lenalebt
lenalebt / Dockerfile
Last active November 13, 2021 12:55
Installing Taskwarrior in Kubernetes
FROM ubuntu:18.04
RUN apt-get update && apt-get -y upgrade
RUN apt-get install -y taskd
CMD taskd server
@lenalebt
lenalebt / LazyList.java
Last active October 21, 2017 07:03
Lazy Fibonacci in Java!
package de.lenabrueder;
import java.util.ArrayList;
import java.util.List;
import java.util.function.Function;
import java.util.function.Supplier;
public class LazyList<T> {
final T head;
LazyList<T> tail = null;