Skip to content

Instantly share code, notes, and snippets.

View benthillerkus's full-sized avatar
🔮
pondering on computers (the pros and cons)

Bent Hillerkus benthillerkus

🔮
pondering on computers (the pros and cons)
View GitHub Profile
@benthillerkus
benthillerkus / iwave_paint.C
Created April 11, 2025 23:47
iWave implementation from "Simulating Ocean Water" and "Interactive Water Surfaces" (Tessendorf 2004)
//------------------------------------------------
//
// iwave_paint
//
// demonstrates the generation and interaction of
// waves around objects by allowing the user to
// paint obstructions and source, and watch iwave
// propagation.
//
// author: Jerry Tessendorf
@benthillerkus
benthillerkus / main.dart
Last active April 4, 2025 21:45
Flutter Widget that changes its childs saturation
import 'package:flutter/material.dart';
class Saturated extends StatelessWidget {
const Saturated({super.key, this.saturation = 1, this.child});
final double saturation;
final Widget? child;
@override
@benthillerkus
benthillerkus / main.dart
Last active March 28, 2022 21:56
horizontal animated sliver list in flutter
// Press add to new elements to the list
// Press the other button to change the direction from vertial to horizontal
// Observe that the animations break and that the content won't scroll either
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
extension Pipe<T> on Object {
T operator >(T Function(Object) f) => f(this);
}
extension Compose<IN, MID> on MID Function(IN input) {
OUT Function(IN) operator &<OUT>(OUT Function(MID) f) =>
(input) => f(this.call(input));
}
String toLowerCase(String input) => input.toLowerCase();
@benthillerkus
benthillerkus / TexturesOneScrapper.py
Last active August 25, 2019 17:20
This scrapper for LilySurfaceScrapper is supposed to be able to scrape https://textures.one . Unfortunately it's bugged: It will call the correct scrapper, but that scrapper will just fetch an empty html for some reason 🤔 https://github.com/eliemichel/LilySurfaceScrapper/issues/15
# Copyright notice?
from .AbstractScrapper import AbstractScrapper
from ..ScrappersManager import ScrappersManager
class TexturesOneScrapper(AbstractScrapper):
source_name = "Textures.one"
home_url = "https://www.textures.one"
# There is probably something rotten about doing it this way, but I couldn't really figure out another way