Skip to content

Instantly share code, notes, and snippets.

@j-griffith
j-griffith / docker-iscsi
Last active February 2, 2022 16:45
Docker iscsi in container run cmd
# This will use the hosts iscsid
docker run -it --net=host --privileged -v /etc/localtime:/etc/localtime:ro \
-v /lib/modules:/lib/modules:ro \
-v /run:/run:shared -v /dev:/dev \
-v /etc/iscsi:/etc/iscsi \
-v /home/jgriffith/vol:/Mount:shared ubuntu bash
# shared declaration on Mount matters!
# You can also put iscsid in another container, share the socket
@ingydotnet
ingydotnet / word-parse.pl
Last active November 26, 2015 04:57
Parse words from a string of smushed together words with a single regexp
#!/usr/bin/env perl
use strict;
# Get all the letters from stdin:
my $input = do {local $/; <>};
$input =~ s/[^a-zA-Z]//g;
# All 3+ letter English words, longest to shortest:
my @long = grep {length > 2}
sort {length $b <=> length $a}