Skip to content

Instantly share code, notes, and snippets.

Oona Räisänen windytan

Block or report user

Report or block windytan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View fake_3D_wave.pl
use warnings;
my $width = 1000;
my $height = 500;
my $n_pts = 1000;
my $wavelength = 9;
print '<svg xmlns="http://www.w3.org/2000/svg" version="1.1" '.
'width="'.$width.'" height="'.$height.'">'."\n";
@windytan
windytan / infini-cat.sh
Created Nov 18, 2018
Infini-cat: Output a file to stdout in an infinite loop
View infini-cat.sh
#!/bin/sh
while true; do cat $1; done
@windytan
windytan / markov-tavut.pl
Last active Oct 24, 2017
Markov-ketjuilla uusia sanoja suomenkielisestä lähdetekstistä
View markov-tavut.pl
#!/usr/bin/perl
#
# Markov-tavutin
#
# (c) Oona Räisänen
# MIT license
#
use strict;
use warnings;
View stackedplot.pl
#!/usr/bin/perl
# windytan 2017, public domain
use warnings;
use strict;
my $img_width = 1200;
my $img_height = 900;
my $yscale = 0.6;
my $xscale = 0.13;
my $rowheight = 5;
View gist:ff01e99d4a99b1762f5eff8e4e5e8792
# Jos lause alkaa yks. 2. persoonan imperatiivilla
if (scalar @ulos == 0 && /^cerebella.? (\S+[aeiouyäö])\b/i) {
$e = $1;
$a = modkom(".verbi $e");
if ($a =~ /(\S+) PRESENT IMPERATIVE/) {
$a = $1;
$i = noppa(9);
if ($i == 0) {
sano("$e ite");
} elsif ($i == 1) {
View ninja.pl
if (/^\.ninja (.+)/) {
$irivi = lc($1);
$irivi =~ tr/ÅÄÖ/åäö/;
$irivi =~ tr/åäöéèü/aaoeeu/;
$irivi =~ s/[^a-z\- ]//g;
$irivi =~ s/\s+$//;
$irivi =~ s/\s\s/ /g;
%ninjanames = qw( a KA b ZU c MI d TE e KU f LU g JI h RI i KI j ZU
k ME l TA m RIN n TO o MO p NO q KE r SHI s ARI
t CHI u DO v RU w MEI x NA y FU z ZI );
@windytan
windytan / bpm.pl
Last active Sep 14, 2016
Count newlines per minute. Press enter for beat. Useful for music, heart rate, etc.
View bpm.pl
#!/usr/bin/perl
#
# bpm.pl - count newlines per minute
#
# Oona Räisänen 2012
# Public domain
#
# Usage: ./bpm [-n SAMPLES] [-p DECIMALS] [-s]
#
# -n SECONDS: average over SECONDS seconds (default 5)
View mandelbrot.pl
@size = (1920, 1080);
@center = (-.743653135, .131826563);
$zoom = .000014628;
$max_it = 700;
$oversample = 2;
$_ *= $oversample for (@size);
open $fh, "|-", "convert -size ".join("x",@size)." -depth 8 gray:- ".
"-resize ".(100/$oversample)."% mandel.png";
for $py (1 .. $size[1]) {
@windytan
windytan / whistle-encode.pl
Last active Sep 27, 2016
whistle encoder
View whistle-encode.pl
#!/usr/bin/perl
# windytan's pea whistle encoder
# http://www.windytan.com/2015/10/pea-whistle-steganography.html
# (c) 2015 Oona Räisänen
# ISC license
use warnings;
use strict;
my $data = $ARGV[0] // "OHAI!";
View gist:449fd78bd1f4bbf36285

Keybase proof

I hereby claim:

  • I am windytan on github.
  • I am oona (https://keybase.io/oona) on keybase.
  • I have a public key whose fingerprint is 5E58 B00C B427 8814 EE00 05ED 57BE DFA9 3BBB EDE8

To claim this, I am signing this object:

You can’t perform that action at this time.