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
# 4chan thread grabber | |
import urllib | |
import urllib2 | |
import json | |
API_URL = "https://api.4chan.org/%s/res/%s.json" | |
IMAGE_URL = "https://images.4chan.org/%s/src/%s" | |
def getThreadInfo(board, id): |
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
# Twitch IRC status autoupdate | |
# Create an empty file called config.yml in the same directory, containing: | |
# host: irc.quakenet.org | |
# port: 6667 | |
# channels: ["#channel", "#anotherchannel"] | |
# nspass: "nickserv/Q password" | |
# password: "server password for BNC or private server" | |
# twitch: "channelname" | |
import requests |
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
<?php | |
# Because sometimes it's easier to load up a web browser. | |
# http://blha303.com.au/rainwave | |
# https://github.com/blha303/Rainwave-NowPlaying | |
header("Access-Control-Allow-Origin: *"); | |
$pagecontent = file_get_contents("http://ocr.rainwave.cc/"); | |
preg_match_all("/PRELOADED_APIKEY = '(.*?)'/", $pagecontent, $matches); | |
$url = "http://ocr.rainwave.cc/sync/2/init"; | |
$data = array('refresh' => 'full', |
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
javascript: (function () { var jB = document.createElement('script'); jB.setAttribute('type', 'text/javascript'); jB.setAttribute('src', 'https://gist.github.com/blha303/7602104/raw/6ad79edbd0bec1b6bce17472409843c61d899842/irccloudlastfm.js'); document.body.appendChild(jB); document.body.appendChild(jB); }()); |
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
from urllib2 import urlopen | |
import sys | |
from os import sep | |
filename = ".".join(sys.argv[0].split(sep)[-1].split(".")[:-1]) | |
def sizeof_fmt(num): | |
for x in ['bytes','KB','MB','GB','TB','PB','EB','ZB']: | |
if num < 1024.0 and num > -1024.0: |
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
javascript: (function () { var text = ""; if (window.getSelection) { text = window.getSelection().toString(); } else if (document.selection && document.selection.type != "Control") { text = document.selection.createRange().text; } else { text = prompt("Enter username", "everyone"); } if (!text) { text = "everyone"; } cb().say("/me slaps " + text.replace(/[<>@+~&]/g, '').trim() + " around a bit with a large trout"); }()); |
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
javascript:SESSION.buffers.each(function (b) { b.setLastSeen(b.messages.last()) }) |
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 requests | |
from bs4 import BeautifulSoup as Soup | |
print "Getting data from jd.bukkit.org..." | |
data = requests.get("http://jd.bukkit.org/dev/apidocs/index-all.html") | |
soup = Soup(data.text) | |
print "Retrieved data. Bukkit version: " + soup.find('title').text[7:-1] | |
methods = {} | |
classes = {} | |
for dt in soup.findAll('dt'): | |
# If more than one link in definition (i.e. a class or method definition)... |
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
(function () { | |
var text = ""; | |
if (window.getSelection) { | |
text = window.getSelection().toString(); | |
} else if (document.selection && document.selection.type != "Control") { | |
text = document.selection.createRange().text; | |
} else { | |
text = cb().getName(); | |
} | |
Array.prototype.randomElement = function () { |
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
javascript:if (cbc().isAway()) { SESSION.connections.each(function (c) { c.setBack() }) } else { var inputbox = $('#bufferInputView' + cb().bid()); var msg = inputbox.val(); inputbox.val(""); SESSION.connections.each(function (c) { c.setAway(msg) }) } |