Skip to content

Instantly share code, notes, and snippets.

View timble-one's full-sized avatar

Timo Bühlmann timble-one

  • Meisterwerk GmbH
View GitHub Profile
const typewriter = document.getElementById('typewriter');
let index = 0;
function type() {
if (index < text.length) {
typewriter.innerHTML = text.slice(0, index) + '<span class="blinking-cursor">|</span>';
index++;
if (['!', '.', '\n'].includes(text[index-2])) {
setTimeout(type, Math.random() * 1500);
} else if (index % 10 == 0 && text[index-2] == ' ') {
setTimeout(type, Math.random() * 600);
# nvm
export NVM_DIR="$HOME/.nvm"
[ -s "/usr/local/opt/nvm/nvm.sh" ] && \. "/usr/local/opt/nvm/nvm.sh" # This loads nvm
[ -s "/usr/local/opt/nvm/etc/bash_completion.d/nvm" ] && \. "/usr/local/opt/nvm/etc/bash_completion.d/nvm" # This loads nvm bash_completion
autoload -U add-zsh-hook
load-nvmrc() {
# this line exits when no .nvmrc file exists in the current directory
# as a consequence of this, this script won't switch back to the default version, when leaving a directory containing a .nvmrc-file
# when cpu gets faster in the future, it could make sense to remove this line again
@timble-one
timble-one / link-phps.bash
Created November 28, 2023 22:59 — forked from yuki777/link-phps.bash
Link the php installed by Brew to ~/.phpenv/versions
public class Euler {
public static void main(String[] args) {
print(euler(1, 2, 2));
print(euler(1, 2, 1));
print(euler(1, 2, 0.1));
print(euler(1, 2, 0.01));
print(euler(1, 2, 0.001));
print(euler(1, 2, 0.0001));
print(euler(1, 2, 0.00001));
public class Collatz36 {
public static void main(String[] args) {
int groupIndex = 0;
int smallestGroupNumber = 0;
int biggestGroupNumber = 0;
for (int n = 101; n < 1000000; n++) {
int stepIndex = 0;
int step = n;
while (stepIndex < 37 && step != 1) {
import java.util.Arrays;
public class Main {
private char[] digits = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'};
private char[] operators = {'+', '*'};
private char[] basement = {'$', '_', '_', '_', '_', '_', '_', '_'};
private int basementPointer = 0;
private char basementBottom = '$';
private char basementPlaceholder = '_';
@timble-one
timble-one / Main.java
Created April 4, 2020 14:58
Timo-UPN
public class Main {
private char[] digits = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'};
private char[] operators = {'+', '*'};
private char[] basement = {'$', '_', '_', '_', '_', '_', '_', '_'};
private int basementPointer = 0;
private char basementBottom = '$';
private char basementPlaceholder = '_';
private char[] word = {'3', '4', '+', '6', '2', '+', '*'};