Skip to content

Instantly share code, notes, and snippets.

View neilalexander's full-sized avatar

Neil neilalexander

View GitHub Profile
ddewaele / edison-output.txt
Last active September 21, 2022 23:56
Edison Linux boot output
WR: 20104000
SCU IPC: 0x800000d0 0xfffce92c
PSH miaHOB version: TNG.B0.VVBD.0000000c
microkernel built 23:15:13 Apr 24 2014
mndrix / irc.go
Last active June 23, 2020 17:21
Family IRC server
// My small, family IRC server
// This file won't compile by itself because it's only one file from
// my larger family server (movie hosting, Asterisk dialplan, Git
// hosting, personal assistant, etc).
// Users authenticate via NICK and PASS. The USER is interpreted as a
// "device" name. That allows each user to connect from multiple
// devices simultaneously while still appearing as only one nick in
// channels. Each nick-device combo has a queue of messages which
ara4n /
Last active July 16, 2021 09:49
Everything you need to know about Perl5

I once wrote one of these before for @NegativeMjark but I think I lost it. So here's another.

All you need to know is:

  • $foo is a scalar (i.e. a single dimensional variable)
  • @foo is an array. $foo[n] is the element of an array.
  • %foo is a hash. $foo{'moo'} aka $foo{moo} is the value in the hash for key 'foo'.
  • \ is the reference operator. it returns a scalar which points to the address of the variable (like & in C).
  • (1, 2, 3) is a list. (an array is a variable which contains a list).
  • [1, 2, 3] (rarely: \(1,2,3)) is a reference to a list - aka arrayref
  • $foo->[n] gives an element of an arrayref