Skip to content

Instantly share code, notes, and snippets.

@masak
masak / unexpected.txt
Last active December 17, 2015 00:29
git clean -dfx
/tmp $ git init repo1
Initialized empty Git repository in /tmp/repo1/.git/
/tmp $ cd repo1
/tmp/repo1 $ git init repo2
Initialized empty Git repository in /tmp/repo1/repo2/.git/
/tmp/repo1 $ cd repo2
@masak
masak / benchmark-results.txt
Last active December 17, 2015 00:19
Rakudo slowness bisect
Albany-48-g540c014 (before any fix): 62m36.194s
Albany-49-g2696aab (after FROGGS' fix): 63m10.034s
with pmichaud's patch: 3m51.940s
@masak
masak / step-by-step
Created May 2, 2013 21:18
getting "Unaligned end in UTF-8 string" for a file that looks completely legit
$ cat q
<p>59 years ago today, Tenzin Gyatso, the <a href="http://en.wikipedia.org/wiki/Tenzin_Gyatso,_14th_Dalai_Lama">14th Dalai Lama</a>, was enthroned as the leader of Tibet at the age of fifteen. I found the Dalai Lama selection process especially interesting, since it is based on the idea of reincarnation:</p>
<div class='quote'><p>A search party was sent to locate the new incarnation when the boy who was to become the 14th was about two years old. It is said that, amongst other omens, the head of the embalmed body of the thirteenth Dalai Lama, at first facing south-east, had mysteriously turned to face the northeast&#8212;indicating the direction in which his successor would be found. The Regent, Reting Rinpoche, shortly afterwards had a vision at the sacred lake of Lhamo La-tso indicating Amdo as the region to search&#8212;specifically a one-story house with distinctive guttering and tiling. After extensive searching, the Thondup house, with its features resembling those in Reting's vision, was final
@masak
masak / haikus.md
Last active December 16, 2015 14:59
rectangular haikus

bruce

semantic continued a
onto get or in the i
an sketch percentage

agreement at agreement
an year get on it be i
signed meeting my by a
@masak
masak / description.md
Last active December 16, 2015 11:59
May 1: 4 hour IRC workshop: Masakism in Perl (5 + 6)

May 1: 4 hour IRC workshop: Masakism in Perl (5 + 6)

Sometimes, the elegant implementation is a function. Not a method. Not a class. Not a framework. Just a function.
        — John Carmack


It’s OK to figure out murder mysteries, but you shouldn’t need to figure out code. You should be able to read it.
        — Steve McConnell


@masak
masak / shell
Created April 20, 2013 13:22
Removing the first line of a file
$ cat example-file
one
two
three
four
$ perl -i.bak -nwe 'print unless 1..1' example-file
$ cat example-file
two
@masak
masak / shuffle-stuff
Created April 19, 2013 19:43
Shuffle everything but the first element
$ perl shuffle-stuff
1
4
5
8
10
3
2
6
7
@masak
masak / code.pl
Created April 13, 2013 16:22
Program exposing the current problem with runtime heredoc de-indenting
say qq:to/END/;
Line 1
{foo}
Line 4
END
sub foo { "Line 2\nLine 3" }