Skip to content

Instantly share code, notes, and snippets.

Avatar

Søren Lund soren

View GitHub Profile
@soren
soren / big_clock.pl
Last active Apr 26, 2021
# Display a big clock using blocks made from reverse video spaces
View big_clock.pl
#!/usr/bin/env perl
# Display a big clock using blocks made from reverse video spaces
use warnings;
use strict;
use feature qw(signatures);
no warnings qw(experimental::signatures);
use utf8;
@soren
soren / schwartzian_transform.pl
Created Mar 19, 2021
Code from the column "Sorting with the Schwartzian Transform" published in "Unix Review" issue 64 (May 2006)
View schwartzian_transform.pl
#!/usr/bin/env perl
# Based on code from http://www.stonehenge.com/merlyn/UnixReview/col64.html
use strict;
use warnings;
use Data::Dumper;
print "Input \$str\n";
View StarTrekPicardWatchGuide.md
View bash-ssh-agent-init.sh
# Setup/start ssh agent
env=~/.ssh/agent.env
agent_load_env () { test -f "$env" && . "$env" >| /dev/null ; }
agent_start () {
(umask 077; ssh-agent >| "$env")
. "$env" >| /dev/null ; }
View foo.pod
#!/usr/bin/env perl use strict; use warnings; use utf8; use File::Basename qw(basename); use Pod::Usage; use App::TimeClock;
View reStructuredText.rst

reStructuredText Demo

This is reStructuredText, a simple lighteight markup language that is readable in source form.

See also Markdown and Wikipedia

View Markdown.md

Markdown Demo

This is Markdown, a simple lighteight markup language that is readable in source form.

See also reStructuredText and Wikipedia

@soren
soren / open_in_ie.html
Created Feb 4, 2015
Simple example of CSS that shows/hides elements based on the browser
View open_in_ie.html
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Open Link in IE</title>
<meta name="author" content="Søren Lund">
<!-- We expect IE browser -->
<style>span.showIE { display: inline } span.hideIE { display: none }</style>
View listtrimdemo.pl
#!/bin/env perl
use warnings;
use strict;
my $line = "one,two, three, four , five ";
sub print_list {
printf "[%s]\n", join(', ', @_);
}
@soren
soren / pwdcomposer.user.js
Created Oct 10, 2014
Password Composer 2.04
View pwdcomposer.user.js
/* vim: ts=4 noet ai :
$Id: pwdcomposer.user.js 79 2006-09-08 07:44:01Z joe $
CREDITS
=======
Inspired by Nick Wolff's bookmarklet "Generate Password"
http://angel.net/~nic/passwdlet.html
MD5 hash functions (c) Paul Johnston