This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdarg.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include <sys/select.h> | |
#include "libircclient.h" | |
#include "ae.h" | |
typedef struct irc_fds_t { | |
fd_set rfd, wfd; | |
} irc_fds_t; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hostname = "localhost" | |
reconnect = true | |
attempts = 10 | |
ignore = { "user1", "user2" } | |
channels = {} | |
for i = 1, 4 do | |
channels[i] = "#channel" .. i | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PC = pkg-config | |
LUA = lua5.1 | |
CFLAGS = `$(PC) --cflags $(LUA)` -Wall -fPIC | |
LDFLAGS = `$(PC) --libs $(LUA)` | |
lsleep.so: lsleep.c | |
gcc -shared $(CFLAGS) $(LDFLAGS) -o $@ $^ | |
clean: | |
-rm lsleep.so |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local mod = require "mod" | |
print(mod.func, mod.x) | |
-- 100, function: 0xFFFFFFFF | |
print(mod.priv, priv) | |
-- nil, nil |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "shorty" | |
shorty:get("/", function() | |
local args = { title = "test", content = "IT WORKS" } | |
return render("index", args) | |
end) | |
shorty:get("/headers", function() | |
local out = {} | |
for k,v in pairs(req.headers) do |
NewerOlder