Skip to content

Instantly share code, notes, and snippets.

class AutoOp
include Cinch::Plugin
listen_to :join
listen_to :message, :method => :add
def listen(m)
op_users = bot.config.config['channels'][m.channel]['operators']
m.channel.op(m.user) if op_users.include?(m.user.nick)
end
# prettier way of doing this? this is within a case on the player update
@fsm.have_all_mats if @fsm.got_all_mats?
@fsm.need_more_mats unless @fsm.got_all_mats?
class Markovgen
include Cinch::Plugin
listen_to :message
@markov_switch = false
@markovbot = Markov.new
def listen(m)
reject = /http[s?]|www|.com|.net|.biz|/
class Markov
def initialize
@firsts = []
@data = {}
end
def add(statement)
words = statement.split
if words.length > 2
package ch1;
public class MyFirstApp {
public static void main(String[] args) {
System.out.println("Hello, world.");
}
}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>hark, a webpage.</title>
<link rel="stylesheet" type="text/css" href="web.css" />
<style type="text/css">
p {
color: red;
System.out.println
function log() {
var i, message = [];
for (i = 0; i < arguments.length; i++) {
message.push(arguments[i]);
}
$('pre').append(message.join(' ') + '\n');
}
@poemdexter
poemdexter / gist:3660349
Created September 6, 2012 21:00
oauth 4.3.654
.
          ▄█▀█▀█▄
        ▄█▀  █  ▀█▄
       ▄█▀       ▀█▄
       █           █
       █           █
       ▀█▄▄  █   ▄█▀
         █  ▄▀▄  █
         █ ▀   ▀ █
         █       █
@poemdexter
poemdexter / gist:3797809
Created September 28, 2012 03:37
0.0.8 Changelog
09.27.12
1. Refactored Mob Attacks and Mob Movement to EntityActions so that I can override behavior per mob.
2. Added MobList in LevelManager to keep multiple instances of same mob.
3. Mobs spawn at .6 second intervals.
4. Bat and Spider spawn 40% of the time. Cultist 20%.