Skip to content

Instantly share code, notes, and snippets.

@keneanung
keneanung / Eraene (Discord) - highlighting.lua
Last active Jan 18, 2019
A number of minor scripts that got developed during Mudlet help sessions
View Eraene (Discord) - highlighting.lua
-- 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 Feb 8, 2019
personal mudlet todo list
View Mudlet-TODO.md
@keneanung
keneanung / installers-TODO.md
Last active May 3, 2018
TODO-List for automating creation of Mudlet installers
View keybase.md

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:

View ManuallyAddPossibleTarget.lua
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 Aug 29, 2015
My implementation of the n queens problem in several iterations
View queens.hs
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 Mar 18, 2014
This is how to catch the 'keneanung.bashing.targetList.firstChanged' event for your own target display in mudlet.
View gist:9617099
-- Script name: catchFirstChanged
-- User defined event handler: keneanung.bashing.targetList.firstChanged
function catchFirstChanged(newTarget)
echo("Our new target is " .. newTarget)
end