Skip to content

Instantly share code, notes, and snippets.

@keneanung
keneanung / Eraene (Discord) - highlighting.lua
Last active January 18, 2019 15:51
A number of minor scripts that got developed during Mudlet help sessions
-- pattern:
-- \b(?|(black)-(\w+)|(\w+)-(black)|(black))\b
-- alternative pattern (less readable but easier to use when copy pasting as only one occurence of a colour needs to be changed):
-- (?(DEFINE)(black))\b(?|((?1))-(\w+)|(\w+)-((?1))|((?1)))\b
-- tests:
-- black solid-black black-hued [works]
-- test haired test eyed test red-haired blue-eyed [works]
-- scarred red [works]
@keneanung
keneanung / Mudlet-TODO.md
Last active February 8, 2019 07:57
personal mudlet todo list
@keneanung
keneanung / installers-TODO.md
Last active May 3, 2018 15:44
TODO-List for automating creation of Mudlet installers

Keybase proof

I hereby claim:

  • I am keneanung on github.
  • I am keneanung (https://keybase.io/keneanung) on keybase.
  • I have a public key whose fingerprint is C86C 916D A8DE 6AFA C841 D6B0 9466 DDE3 7294 7F5B

To claim this, I am signing this object:

tempAlias("^kconfig bashing addTarget \\w*?(\\d+)$", [[
for _, item in ipairs(keneanung.bashing.room) do
if item.id == matches[2] then
keneanung.bashing.addPossibleTarget(item.name)
return
end
end
]])
@keneanung
keneanung / queens.hs
Last active August 29, 2015 13:59
My implementation of the n queens problem in several iterations
import System.Environment
import Data.List
import Control.Monad
--Remember: foldM for list monads uses EACH element as input for the next fold!!
queen :: Int -> [[Int]]
queen n = foldM foldingFunction [] [1..n]
where
-- Our folding function. It works like this:
@keneanung
keneanung / gist:9617099
Created March 18, 2014 10:06
This is how to catch the 'keneanung.bashing.targetList.firstChanged' event for your own target display in mudlet.
-- Script name: catchFirstChanged
-- User defined event handler: keneanung.bashing.targetList.firstChanged
function catchFirstChanged(newTarget)
echo("Our new target is " .. newTarget)
end