Skip to content

Instantly share code, notes, and snippets.

View jameswritescode's full-sized avatar
✍️
we vibing now

James Newton jameswritescode

✍️
we vibing now
View GitHub Profile
{
{I have|I've} been {surfing|browsing} online more than {three|3|2|4} hours today, yet I never found any interesting article like yours. {It's|It
is} pretty worth enough for me. {In my opinion|Personally|In my view}, if all {webmasters|site owners|website owners|web owners} and bloggers made good content as
you did, the {internet|net|web} will be {much more|a lot more}
useful than ever before.|
I {couldn't|could not} {resist|refrain from} commenting. {Very well|Perfectly|Well|Exceptionally well} written!|
{I will|I'll} {right away|immediately} {take hold of|grab|clutch|grasp|seize|snatch}
your {rss|rss feed} as I {can not|can't} {in finding|find|to find} your {email|e-mail} subscription {link|hyperlink} or {newsletter|e-newsletter} service. Do {you have|you've} any?
{Please|Kindly} {allow|permit|let} me {realize|recognize|understand|recognise|know} {so that|in order that} I {may just|may|could} subscribe.
Thanks.|
[3] pry(#<RubyServ::IRC>)> RubyServ::IRC::Client.create(@socket, nickname: 'testing', hostname: 'test.ing', username: 'test', realname: 'test', modes: '')
>> :0RS UID testing 0 0 + test test.ing 0 0RSSR0002 :test
=> #<RubyServ::IRC::Client:0x007f8103e74d30
@hostname="test.ing",
@modes="",
@nickname="testing",
@realname="test",
@socket=#<TCPSocket:fd 8>,
@uid="0RSSR0002",
@username="test">

Plugins

Plugins are centric to the RubyServ ecosystem because it is what handles how your services will function.

Plugins go into the plugins directory, and the best example of one of the plugins is RubyServ itself, found in plugins/core.rb.

The only thing required in a plugin are include RubyServ::Plugin and configure. The module name doesn't matter, but stay out of the RubyServ namespace to avoid namespace clashes.

configure(&block)

usefullrecipes {
B:BeryliumReflector=true
B:Compress2Storageblock=true
B:DifficultIridiumPlate=true
B:ElectricSteelTools=true
B:ExpensiveBCQuarryRecipe=true
B:ExpensiveLaser=true
B:ExpensiveMaceratorRecipe=true
B:ExpensiveNanoSaber=true
B:ExpensiveNukeRecipe=true
***** List *****
-
Provides a complete listing of all channels on the network.
If a search string is specified, it will only show those
matching the search string.
-
Syntax: LIST <search string>
Example: LIST
LIST *ircd*
-
import re
from util import hook, http
github_repo = (r'((gist\.)?github.com/((\S+)(/(\S+))?))', re.I)
def get_repo_info(repo):
try:
j = http.get_json('https://api.github.com/repos/%s' % repo)
#include <stdio.h>
typedef struct {
char *name;
int age;
} Person;
void person_info(Person person)
{
printf("%s, %i\n", person.name, person.age);
2013-11-07 20:40:24 --> anon321 (Mibbit@SplitNET-1qt5us.torservers.net) has joined #splitnet
2013-11-07 20:40:46 anon321 who wants to see splitnet split
2013-11-07 20:43:16 tyler how much split could a split net net if a split net did net split
2013-11-07 20:43:23 <-- Harrison (Harrison@SplitNET-h5q.4sf.188.192.IP) has quit (Connection closed)
2013-11-07 20:45:20 <-- VanKrause (lolol@SplitNET-t56blg.ca.charter.com) has quit (Ping timeout: 121 seconds)
2013-11-07 20:46:35 --> Harrison (Harrison@SplitNET-h5q.4sf.188.192.IP) has joined #splitnet
2013-11-07 20:46:47 anon321 :)
2013-11-07 21:02:38 --> VanKrause (lolol@SplitNET-t56blg.ca.charter.com) has joined #splitnet
2013-11-07 21:39:27 <-- anon321 (Mibbit@SplitNET-1qt5us.torservers.net) has left #splitnet
2013-11-08 01:02:37 newton lol
#include <stdio.h>
typedef struct {
char *eyes;
char *hair;
} Colors;
typedef struct {
char *name;
char *age;
#include <stdio.h>
int main(int argc, const char *argv[])
{
char *people[3] = {"iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii", "Robert Babcock", "Zach Smith"};
for (int i = 0; i < sizeof(people) / sizeof(people[0]); i++) {
printf("Size of people[%i]: %lu\n", i, sizeof(people[i]));
printf("Name: %s\n", people[i]);
}