Skip to content

Instantly share code, notes, and snippets.

View softmoth's full-sized avatar

Tim Siegel softmoth

View GitHub Profile
@softmoth
softmoth / arch-linux-install
Last active January 16, 2023 13:55 — forked from mattiaslundberg/arch-linux-install
Minimal instructions for installing arch linux on an UEFI system with full system encryption using dm-crypt and luks
# Install ARCH Linux with encrypted file-system and EFI on 8,2 MacBook.
# The official installation guide contains a more verbose description:
# https://wiki.archlinux.org/index.php/Installation_Guide
# Resize "Macintosh HD" to make room for Linux. This works live, including with
# whole-disk encryption (WDE, FileVault). Ensure backups are current, of course,
# before proceeding
diskutil list
diskutil cs list
# Ensure all data will fit in 250G, with some to spare!
#! /usr/bin/env perl6
use v6;
my $output = Supply.new;
$output.act(*.note);
my @workers = do for ^5 -> $id {
start {
for ^5 -> $iter {
@softmoth
softmoth / chdir-segfault
Created August 30, 2015 23:05
perl6-m segfault with start { ... rm_rf } combo
#! /usr/bin/env perl6
use Shell::Command;
constant $top = './tmp/junk';
sub MAIN (:$workers = 5, :$levels = '20, 3, 5', Bool :$force = False, Bool :$create-only = False) {
create-junk($levels.comb(/\d+/)) if $force or not $top.IO.d;
remove-junk($workers) unless $create-only;
note "# DONE";
@softmoth
softmoth / .gitignore
Last active August 31, 2015 20:25
export-ecosystem perl6
tmp/
cache/
#! /usr/bin/env perl6
constant $me = 'YOUR-GITHUB-USER';
constant $token = 'YOUR-GITHUB-OAUTH-TOKEN';
sub MAIN(Bool :n(:$dry-run) = False) {
my %remotes;
for qqx<< git remote -v >>.lines {
/
^ (<-[\t]>+)
#! /usr/bin/env perl6
v6;
sub MAIN() {
use lib './ext/xyz/bin';
use xyz <foo>;
my $foo = foo();
say "Testy says: $foo!";
}
#! /usr/bin/env perl6
#use Grammar::Tracer;
grammar PandaInfo {
regex TOP { <pkginfo>* { make [$<pkginfo>».made] } }
regex pkginfo { [
| <notfound> { make $<notfound>.made }
|
<name> <descr> <info>* {
@softmoth
softmoth / gist:3687899
Created September 9, 2012 23:22
.perl loop on recursive data structure
# vim:set ft=perl6:
my %foo;
%foo<a> = 'a' => [];
%foo<b> = 'b' => [];
push %foo<a>.value, %foo<b>;
# Rakudo and niecza will never return from .perl method
push %foo<b>.value, %foo<a>;
note "Before .perl";
@softmoth
softmoth / gist.css
Created September 9, 2012 18:05 — forked from kris-g/gist.css
Tumblr Gist css
.gist {
color: #000000;
}
.gist div {
margin: 0;
padding: 0;
}
.gist .gist-file {
border: 1px solid #DEDEDE;
font-family: Monaco,"Courier New","DejaVu Sans Mono","Bitstream Vera Sans Mono",monospace;
@softmoth
softmoth / param-pairs.pl
Created September 7, 2012 06:40
Pair literal or named parameter in Capture context
sub foo (*@positional, *%named) {
@positional.perl.say;
%named.perl.say;
}
# Result: ('one' => 1, 'two' => 'ii', 'one' => Block).list, ().hash
foo('one' => 1, 'two' => 'ii', 'one' => { say "ॐ" })
# Result: ().list, ('two' => 'ii', 'one' => Block).hash
foo(one => 1, two => 'ii', one => { say "ॐ" })