Skip to content

Instantly share code, notes, and snippets.

View windytan's full-sized avatar
💭
I may be slow to respond.

Oona Räisänen windytan

💭
I may be slow to respond.
View GitHub Profile
@windytan
windytan / helicopter-decode.sh
Last active August 20, 2024 17:24
Decode the helicopter position signal from youtube videos!
#!/bin/sh
# Decode the helicopter position signal from youtube videos!
# It makes a KML file. You can open it in Google Earth or many other GIS programs.
# Requires sox, perl, and minimodem, and optionally yt-dlp / ffmpeg
# https://www.windytan.com/2014/02/mystery-signal-from-helicopter.html
# Remove this line
echo "Don't just run any random script you find online! Read what it does first!" && exit 1
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 / markov-tavut.pl
Last active October 24, 2017 10:26
Markov-ketjuilla uusia sanoja suomenkielisestä lähdetekstistä
#!/usr/bin/perl
#
# Markov-tavutin
#
# (c) Oona Räisänen
# MIT license
#
use strict;
use warnings;
#!/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;
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 / whistle-encode.pl
Last active March 22, 2025 00:30
whistle encoder
#!/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!";

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:

#include <openssl/sha.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
int main() {
const char target[SHA_DIGEST_LENGTH] = {
0x69, 0xaf, 0x88, 0x1e, 0xca, 0x98, 0xb7, 0x04, 0x2f, 0x18,
0xe9, 0x75, 0xe0, 0x0f, 0x9d, 0x49, 0xd5, 0xd5, 0xee, 0x64
};
@windytan
windytan / dark_cpan.pl
Created December 11, 2014 22:56
dark perldoc & CPAN
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document
domain('cpan.org')
{
html, body, tbody, tr, td, div { background-color: #232323 !important; color: #ccc !important }
pre {
display: block !important ;
background-color: #333333 !important ;
border: #777777 solid 0.1em !important ;
use warnings;
$fs = 48000;
$pi = 3.141592653589793;
open U, "|sox -t .raw -e sig -b 16 -c 1 -r $fs - numbers.wav sinc 300-4300";
dtmf ("12345567899000100100");
close U;