Skip to content

Instantly share code, notes, and snippets.

@davel
davel / cheesecake.md
Last active December 28, 2020 22:36
Cheesecake

Cheesecake

Base

Ingredients

  • 4 oz plain flour
  • 1⅓ oz butter
  • 2⅔ golden syrup
  • ½ tsp sodium bicarbonate
@davel
davel / gist:baec4755eda5023e489d
Created October 21, 2014 23:02
Mouse over captions in CSS
<html>
<head>
<title>Mouseover example</title>
<style type="text/css">
/* The style of the "caption" <div> with the pointer outside. */
div.mousy div.caption { display: none; }
/* The style of the "caption" <div> during the hover. */
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
int main(int argc, char *argv[]) {
int fd_orig;
int fd_dup;
char c;
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
int main(int argc, char *argv[]) {
int fd_orig;
int fd_dup;
char c;
my $pid;
my $timed_out;
local $SIG{ALRM} = sub {
$timed_out = 1;
warn "all went wrong";
kill(9, $pid) if $pid;
};
alarm(30);
$pid = fork();
davel@isosceles:~/state51Platform$ prove gah
gah .. ok
All tests successful.
Files=1, Tests=1, 0 wallclock secs ( 0.04 usr 0.00 sys + 0.02 cusr 0.00 csys = 0.06 CPU)
Result: PASS
davel@isosceles:~/state51Platform$ cat gah
#!/usr/bin/perl
use strict;
use warnings;
#!/usr/bin/env perl
use strict;
use warnings;
use Text::CSV_XS;
use Text::CSV_PP;
use Test::More;
#!/usr/bin/perl
use strict;
use warnings;
use Test::More;
my $foo = chr(0xff);
is(length($foo), 1, "character length of string is 1");
ok(!utf8::is_utf8($foo), "string not utf-8 upgraded");
#!/usr/bin/env perl
use strict;
use warnings;
open(my $fh, "<", $ARGV[0]) or die $!;
parse_mp4($fh, -s $fh);
exit 0;
$TT->context->stash->set('system', $config->{system});