Skip to content

Instantly share code, notes, and snippets.

@snltd
snltd / gist:edad5d2e7ddd5678b20684688723968b
Created October 21, 2019 09:33
OmniOS zone nfs server panic
$ uname -a
SunOS tornado 5.11 omnios-nfs-zone-9070d0fece i86pc i386 i86pc
$ pfecex pkg refresh
$ pfexec pkg update
$ pfexec pkg apply-hot-fix --be-name=nfs-zone https://hf.omnios.org/bloody/nfs-zone-20191018.p5p
$ pfexec reboot
After reboot, in the zone, created a ZFS dataset and
@snltd
snltd / challenge.rb
Created May 31, 2019 16:24
Friday challenge 2019-05-31
#!/usr/bin/env ruby
class String
def index
ord > 96 ? ord - 96 : ord - 64
end
def shift_by(other)
caser = ord > 96 ? :downcase : :upcase
i = self.index - other.index + 1
@snltd
snltd / gist:abb45854b1511e46fcc941f807804734
Last active January 17, 2019 12:53
Crystal does not run in an LX zone
$ uname -a
Linux 02fe7059-dc4d-4fea-d227-b846741ee4b3 4.3.0 BrandZ virtual linux x86_64 x86_64 x86_64 GNU/Linux
$ curl -sL "https://keybase.io/crystal/pgp_keys.asc" | sudo apt-key add -
$ echo "deb https://dist.crystal-lang.org/apt crystal main" | sudo tee /etc/apt/sources.list.d/crystal.list
$ sudo apt update
$ sudo apt install crystal
...
$ crystal
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc