This file contains 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 <uv.h> | |
#include "libwebsockets.h" | |
struct lws_context *context; | |
uv_loop_t loop; | |
static int callback_gateway(struct lws *wsi, enum lws_callback_reasons reason, void *user, void *in, size_t len); | |
static int callback_http(struct lws *wsi, enum lws_callback_reasons reason, void *user, void *in, size_t len); | |
#define MAX_BUFFER_COUNT 16 |
This file contains 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 <stdlib.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include <arpa/inet.h> | |
#include "SDL_net.h" | |
main(int argc, char *argv[]) { | |
IPaddress serverIP; | |
UDPsocket udpsock; |
This file contains 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
<?xml version='1.0'?> | |
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'> | |
<fontconfig> | |
<match target="font"> | |
<edit mode="assign" name="rgba"> | |
<const>none</const> | |
</edit> | |
</match> | |
<match target="font"> | |
<edit mode="assign" name="hinting"> |
This file contains 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
cgi-irc kennylizer | |
This code converts sentences: the output is like that: "*ll* *ulm* *mmmmmlu* *lmu* *lu* *mmffmm*" | |
it is unfinished, but usable | |
How to install: modify nph-irc.cgi (located at /usr/lib/cgi-bin/cgiirc/ on debian systems) | |
To turn it on: create a file named "kenny" at /etc/cgiirc/ (echo flmufml>/etc/cgiirc/kenny) | |
To turn it off: remove the file (rm /etc/cgiirc/kenny) |
This file contains 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
#!/usr/bin/env ruby | |
require 'optparse' | |
def parse_command_line | |
options = {} | |
optparse = OptionParser.new do |opts| | |
opts.banner = "Usage: #{__FILE__} [options] encoding path\n" + | |
"Encoding like UTF8-MAC or ISO-8859-2" |
This file contains 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 'log4r' | |
original_verbosity = $VERBOSE | |
$VERBOSE = nil | |
module Log4r | |
class PatternFormatter | |
DirectiveTable = { | |
"c" => 'event.name', | |
"C" => 'event.fullname', | |
"d" => 'format_date', |
This file contains 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 "em-synchrony" | |
EventMachine.synchrony do | |
counter = 0 | |
timer = EM::Synchrony.add_periodic_timer(0.2) do | |
puts counter | |
counter += 1 | |
if counter > 4 | |
timer.interval = 1 | |
end |
This file contains 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 "em-synchrony" | |
EventMachine.synchrony do | |
Fiber.new do | |
while true | |
EM::Synchrony.sleep(0.5) | |
puts 'here' | |
end | |
end.resume |