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
# Lightweight library to access the System V message queue functionality on Mac OS X (32 and 64 bit) | |
# Still quite scrappy and needs to be packaged up properly but.. it works! | |
# Tested on 2.6.3 | |
require 'fiddle' | |
class MsgQ | |
LIBC = Fiddle.dlopen('libc.dylib') | |
IPC_CREAT = 001000 |
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
# glow.cr | |
# simplest ever SSE streaming | |
# you can test it with the following bash command | |
# curl http://127.0.0.1:8888 | |
# | |
require "http/server" | |
server = HTTP::Server.new do |context| | |
context.response.content_type = "text/event-stream" |
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
-- imba part: | |
tag App | |
def build | |
messages | |
def messages | |
console.log('messages') | |
@last_event_id = "0" |