Skip to content

Instantly share code, notes, and snippets.

View emekoi's full-sized avatar
📚

Emeka Nkurumeh emekoi

📚
View GitHub Profile
@emekoi
emekoi / randomImage.moon
Last active March 7, 2016 05:37
moonscript file for generating random binary data images.
math.randomseed os.time!
export yes = false
export x_counter = 0
export x = if yes == true then 0 else 1
while true
@emekoi
emekoi / kclasses.moon
Created March 9, 2016 01:57
Experiments in MoonScript
foo =
str: [[String]]
classa: class
init:=>
print "adad"
foo.classa\init!
class klassa
begin:
@emekoi
emekoi / md.md
Created June 18, 2016 20:35
awesome

panabee.com

@emekoi
emekoi / build.moon
Last active July 6, 2016 17:09
converting some python to lua/moonscript
#!/usr/local/bin/moon
@emekoi
emekoi / box.moon
Last active July 6, 2016 23:19
build_box
box = {}
box.init = ->
f = io.open(".rules.moon", "wb")
f\write([[
file["main.moon"] = "main.moon"
action["main.moon"] = "echo #{file} changed"
{:file, :action}
]])
f:close!
/* Copyright (c) 2016 Emeka N. All Rights Reserved. */
#ifndef log_h_
#define log_h_
#include <stdio.h>
#include <stdarg.h>
#include <time.h>
#define COLOR_RED "\x1b[31m"
#define COLOR_GREEN "\x1b[32m"
@emekoi
emekoi / types.moon
Last active August 2, 2016 00:09
misp
M = {}
@emekoi
emekoi / fifo_stack.moon
Last active August 3, 2016 21:58
stacks, linked lists oh my
class fifo
MAX = 256*256
new: (@maxSize = MAX) =>
@stack = {}
@top = 0
kill: =>
@stack = nil
@top = nil
isEmpty: =>
return @top < 1
@emekoi
emekoi / inheritance.moon
Last active August 22, 2016 21:37
moonscript stuff
class sjj
@scream: (...) =>
k = {...}
print "hello" .. table.concat k
new: =>
@@scream " world"
d = sjj!
d.__class\scream " and"