Skip to content

Instantly share code, notes, and snippets.

View AlexDaniel's full-sized avatar

Aleks-Daniel Jakimenko-Aleksejev AlexDaniel

  • Tallinn, Estonia
View GitHub Profile
@AlexDaniel
AlexDaniel / keybase.md
Last active August 19, 2016 15:18
keybase.md

Keybase proof

I hereby claim:

  • I am AlexDaniel on github.
  • I am alexdaniel (https://keybase.io/alexdaniel) on keybase.
  • I have a public key whose fingerprint is E1A5 75CC C2D5 8C7A A560 9FE1 4710 D9D4 34A4 A3C6

To claim this, I am signing this object:

@AlexDaniel
AlexDaniel / #! perl6
Last active September 3, 2016 02:38
Shebangs in different perl 6 modules (read “|” as “/”)
path-iterator
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@AlexDaniel
AlexDaniel / save-me-from-texas.creole
Last active March 14, 2017 01:01
Save me from Texas

⚠⚠⚠⚠⚠⚠⚠ ↓↓↓ PAGE MOVED ↓↓↓ ⚠⚠⚠⚠⚠⚠⚠

I moved this page to rakudo wiki. A lot of people wanted to add stuff, but gists are not editable. A wiki is a more appropriate place for this kind of stuff. Rakudo wiki is possibly not the best place for it, but for now that will do.

Plus, GitHub gists totally suck when unicode characters are involved. There's also no preview option here. So I'm glad that it is being moved.

⚠⚠⚠⚠⚠⚠⚠ ↑↑↑ PAGE MOVED ↑↑↑ ⚠⚠⚠⚠⚠⚠⚠

Recently Perl 6 got support for various unicode characters (½ ¹ ∞ × ÷, see this link for a full list), but I don't think that we are done. Here is a list of things to think about.

@AlexDaniel
AlexDaniel / test.pl6
Last active July 8, 2017 15:51 — forked from dogbert17/test.pl6
Fails when run normally but works with MVM_SPESH_DISABLE=1
use nqp;
{
constant $read-file = "README.md".IO;
$read-file.IO.r;
for ^1000 {
my $p = Proc::Async.new( | «/bin/cat $read-file» );
my $output = '';
$p.stdout.tap: -> $s { $output ~= $s; };
await $p.start;
use nqp;
my $html;
my $proc = run "wget", "-o", "/dev/null", "-O", "-", "https://www.fimfiction.net/bookshelf/149291/", :out;
$html = $proc.out.slurp-rest;
say "html is " ~ $html.chars ~ " chars";
nqp::force_gc;
say "/proc/$*PID/statm".IO.lines[0].split(/\s/)[5] * 4096 / 1024
@AlexDaniel
AlexDaniel / mustache-hyper.pl6
Last active August 20, 2017 16:43 — forked from scmorrison/mustache-hyper.pl6
Perl 6 - Template::Mustache.render dies with hyper
#!/usr/bin/env perl6
use lib ‘data/all-modules/softmoth/p6-Template-Mustache’;
use v6;
#use v6.d.PREVIEW;
use Template::Mustache;
my $html = q:to/EOF/;
<html>
{{> head }}
@AlexDaniel
AlexDaniel / awesome
Created October 15, 2017 20:59
Awesome layout that does not work in pluma and chromium
default alphanumeric_keys modifier_keys function_keys alternate_group
xkb_symbols "awesome" {
include "us"
name[Group1]= "My Awesome Layout";
key <AE02> { [ 2, at, Page_Up, Page_Up ] };
key <AE03> { [ 3, numbersign, Page_Down, Page_Down ] };
key <AD01> { [ q, Q, Escape, Escape ] };