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
#!/usr/bin/env ruby | |
require 'socket' | |
# http://railsforum.com/viewtopic.php?id=10057 for string extension below | |
class String | |
def starts_with?(characters) | |
self.match(/^#{characters}/) ? true : false | |
end | |
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
# | |
# | |
# Nimrod's Runtime Library | |
# (c) Copyright 2010 Amrykid | |
# | |
# See the file "copying.txt", included in this | |
# distribution, for details about the copyright. | |
# | |
## | |
import sequtils |
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
import events | |
import streams | |
import os | |
import times | |
type | |
TFormatEnum* = enum | |
file = 1, socket = 2, other = 3 | |
TLogger = object of TObject |
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
# | |
# | |
# Nimrod's Runtime Library | |
# (c) Copyright 2011 Alex Mitchell | |
# | |
# See the file "copying.txt", included in this | |
# distribution, for details about the copyright. | |
# | |
## :Author: Alex Mitchell |
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
import strutils | |
# CONST | |
const | |
loc = "<locale.h>" | |
winnls = "Winnls.h" | |
stdlib = "<stdlib.h>" | |
# FUNCTIONS RELATED TO GETTING LOCALE NAME | |
when defined(windows): |
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
SectionLang = en | |
[Hello] | |
es = "Hola" | |
de = "Hallo" |
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
import events | |
import sockets | |
import strutils | |
type | |
TMessageReceivedEventArgs = object of TEventArgs | |
Nick*: string | |
Message*: string | |
TIRC = object | |
EventEmitter: TEventEmitter |
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
import events | |
import sockets | |
import strutils | |
import os | |
type | |
TMessageReceivedEventArgs = object of TEventArgs | |
Nick*: string | |
Message*: string | |
TIRC = object |
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
public abstract class IRCBot | |
{ | |
public abstract IEnumerable<string> OnChannelMessage(string channel, string msg); | |
} | |
public class MyIRCBot : IRCBot | |
{ | |
public IEnumerable<string> OnChannelMessage(string channel, string msg) | |
{ | |
yield "Send a message to the channel."; | |
yield "Another message sent."; |
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
import os | |
type | |
TUtf16Char = distinct int16 | |
WideCString = ptr array[0.. 1_000_000, TUtf16Char] | |
const | |
utf8Encoding = 65001 | |
proc len(w: WideCString): int = |
OlderNewer