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 | |
| # encoding: utf-8 | |
| $:.unshift '~/Projects/DSI/lib' | |
| require 'dsi' | |
| require 'dsi/extensions' | |
| options = { | |
| hostname: 'irc.phora.net', | |
| nickname: 'anura' | |
| } |
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 | |
| # encoding: utf-8 | |
| require 'date' | |
| module DR | |
| class TV | |
| attr_reader :channels | |
| def initialize options = {} | |
| @client = DR::Client.new |
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 | |
| # encoding: utf-8 | |
| $:.unshift '~/Projects/DSI/lib' | |
| require 'dsi' | |
| require 'dsi/extensions' | |
| options = { | |
| hostname: 'irc.phora.net', | |
| nickname: 'anura' | |
| } |
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
| # encoding: utf-8 | |
| module Wildcard | |
| def self.match pattern, source, casefold = false | |
| pattern = compile pattern, casefold | |
| !(source =~ pattern).nil? | |
| end | |
| protected | |
| def self.compile pattern, casefold |
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
| # encoding: utf-8 | |
| config do |x| | |
| x.name = "example" | |
| x.author = "Mikkel Kroman <[email protected]>" | |
| x.version = "1.0.0" | |
| bind :privmsg, :on_message | |
| 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
| p File.path(File.join(File.expand_path(__FILE__), '../dsi')) |
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
| puts "fem" |
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
| Fem = 100 |
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
| module DSI | |
| class Message | |
| attr_accessor :body | |
| def initialize body, private = false | |
| @body = body | |
| @private = private | |
| end | |
| def private? |
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 <stdio.h> | |
| #include <unistd.h> | |
| #include "oculus.hpp" | |
| Oculus::Oculus() { | |
| if ((disp = XOpenDisplay(":0")) == NULL) | |
| printf("Could not connect to X server\n"); | |
| Window active = this->getActiveWindow(); | |
| printf("%s - %dx%d\n", this->getWindowName(&active), this->getWindowWidth(&active), this->getWindowHeight(&active)); |
OlderNewer