Skip to content

Instantly share code, notes, and snippets.

View jast's full-sized avatar

Jan Krüger jast

View GitHub Profile
@jast
jast / git-renovate.md
Last active June 20, 2023 16:52
git-renovate: a preliminary design

git-renovate (rough design)

Name

git-renovate (name subject to change) - Overwrite files, the index and/or the branch with different versions

Status

This is another attempt to replace the difficult-to-understand git checkout

diff --git a/PlainFileStoreContrib/lib/Foswiki/Store/PlainFile.pm b/PlainFileStoreContrib/lib/Foswiki/Store/PlainFile.pm
index 99490ffb3..85d1e7659 100644
--- a/PlainFileStoreContrib/lib/Foswiki/Store/PlainFile.pm
+++ b/PlainFileStoreContrib/lib/Foswiki/Store/PlainFile.pm
@@ -183,9 +183,14 @@ sub readTopic {
my $mf = _metaFile( $meta, undef, $version );
( $ri{author}, $ri{comment} ) = _readMetaFile($mf);
$ri{date} = ( stat _historyFile( $meta, undef, $version ) )[9];
+ } else {
+ # Loaded .txt file - reuse info from META:TOPICINFO, if any
#!/usr/bin/perl
use Getopt::Long;
use JSON;
use LWP::UserAgent;
use Mojo::UserAgent;
use open ':encoding(UTF-8)';
use open ':std';
=head2 routine categorize
Defined as:
multi sub categorize(&mapper, *@values) returns Hash:D
multi method categorize(List:D: &mapper) returns Hash:D
Usage:
categorize MAPPER, LIST
@jast
jast / bingwpdl.pl
Created April 14, 2015 14:16
Wallpaper downloader for bing.com
#!/usr/bin/perl
# Quick and dirty wallpaper download script
# Grabs images from bing.com (changes daily)
use strict;
use warnings;
use JSON;
use Mojo::UserAgent;
use Mojo::Util;
@jast
jast / 00README.md
Last active April 21, 2017 11:32
JS (http://www.jesusonic.com/) scripts for use in REAPER or, with ReaJS, in any Windows DAW that supports VST plugins

This Gist contains JS (http://www.jesusonic.com/) scripts for use in REAPER or, with ReaJS, in any Windows DAW that supports VST plugins.

  • JK/aliaser: add deliberate aliasing artifacts to audio... with an option to really overdo it.
  • JK/metallicator: add deliberate "metallic"-sounding artifacts to audio, as produced by some well-known pitch shifters.
  • JK/TwoStageLimiter: a work in progress that limits audio in two ways simultaneously. The first threshold is "soft", i.e. it still lets through transients; the second is a standard brickwall limiter applied on top of that. This can be used to let transients clip (which may be appropriate depending on your project) and still limit everything else. It currently adds some vaguely saturation-y distortion, but sounds pretty decent with sane thresholds. I intend to change the release curve at some point to make the pumping somewhat more unobtrusive.

To install a script in REAPER:

  • in the