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 'cinch' | |
require 'open-uri' | |
require 'json' | |
require 'date' | |
class Rando | |
include Cinch::Plugin | |
match /raw (.+)/, method: :do_raw | |
match /refresh/, method: :do_refresh | |
match /index/, method: :do_index_get | |
match /index (.+)/, method: :do_index_set |
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 | |
# encoding: UTF-8 | |
require 'snoo' | |
reddit = Snoo::Client.new :useragent => '/u/flotwig - Responds to "It is known." with "It is known." http://l.t.tl/1q' | |
reddit.log_in 'KhaleesiServantGirl', '' | |
debug = false | |
latest_id = 0 | |
def base10_reddit_id(base36_id) | |
return base36_id.split('_',2).last.to_i(36) | |
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
# because i keep forgetting | |
rm znc.pem | |
openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 3650 -nodes | |
cat key.pem > znc.pem | |
cat cert.pem >> znc.pem |
NewerOlder