This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
# This program constantly prints the time in GCT (Galactic Coordinated Time) | |
# as used in the MMORPG Tau Station (https://taustation.space/) | |
# Obviously, we use something a bit more sophisticated than this :) | |
use strict; | |
use warnings; | |
use Time::HiRes 'sleep'; | |
$|++; # unbuffer STDOUT |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# vim: filetype=sh | |
set -e # exit if any command fails | |
prog=$(basename $0) | |
branch=$(git rev-parse --abbrev-ref HEAD) | |
need_to_stash=$(git status --porcelain -uno) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use 5.18.0; | |
use warnings; | |
use autodie ":all"; | |
use LWP::UserAgent; | |
use HTTP::Request::Common; | |
use HTML::TokeParser::Simple; | |
my $login_url = 'https://www.livejournal.com/login.bml?ret=1'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package Ovids::Debugger; | |
# vim: syntax=perl | |
=head1 NAME | |
.perldb - Customize your Perl debugger | |
=head1 USAGE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use Modern::Perl; | |
use Net::Twitter; | |
use Config::Tiny; | |
use File::HomeDir; | |
use utf8::all; | |
use Text::Wrap; | |
use Term::ANSIColor; | |
use autodie ':all'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"io" | |
"os" | |
"strings" | |
) | |
type rot13Reader struct { | |
reader io.Reader |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
// newton's method for calculating square roots | |
import ( | |
"fmt" | |
"math" | |
) | |
func Sqrt(x float64) float64 { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# per https://perso.ens-lyon.fr/jean-michel.muller/chapitre1.pdf (page 8), the | |
# following should approach the limit of 6, but all floating point implementations | |
# go crazy and approach a limit of 100. I wrote it in Perl 6 using Real and sure enough, | |
# it approaches 6 before going crazy and approaching 100. But when I switch from Real to | |
# Rat, I get "Type check failed in assignment to $w; expected Rat but got Num" after | |
# 25 iterations | |
# This is Rakudo version 2015.12-307-gd68c304 built on MoarVM version 2016.01 | |
# implementing Perl 6.c. | |
# https://perso.ens-lyon.fr/jean-michel.muller/chapitre1.pdf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# a rewrite of http://blogs.perl.org/users/ovid/2016/01/a-naive-sql-shell.html in Perl 6 | |
use v6; | |
use DBIish; | |
use Linenoise; | |
use Text::Table::Simple; | |
my constant HIST-FILE = '.myhist'; | |
my constant HIST-LEN = 100; | |
my constant ROW-LIMIT = 100; |