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
String.prototype.markdown2html = function () { | |
var text = this; | |
// Bold | |
text = text.replace(/(\*\*|__)(?=\S)([^\r]*?\S[*_]*)\1/g, "<strong>$2</strong>"); | |
// Italics | |
text = text.replace(/(\*|_)(?=\S)([^\r]*?\S)\1/g, "<em>$2</em>"); | |
// Auto-detect links and convert them to markdown | |
text = text.replace(/(\]\()?((https?|ftp|dict):[^'">\s]+)/gi, function($0, $1, $2) { return $1?$0:"[" + $2 + "](" + $2 + ")"}); | |
// Inline Links | |
text = text.replace(/(\[((?:\[[^\]]*\]|[^\[\]])*)\]\([ \t]*()<?(.*?(?:\(.*?\).*?)?)>?[ \t]*((['"])(.*?)\6[ \t]*)?\))/g, '<a href="$4">$2</a>'); |
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
// Audio To Play when one of the strings is mentioned | |
window.pingAudio = new Audio('http://www.soundjay.com/button/sounds/beep-7.mp3'); | |
// Array of strings to notify you on, i.e. ['Navarr','Highlife','Darn']; | |
window.notifyMeOn = ['ju1cy','mr_darn','admin','help']; | |
document.sendMessage = function (msg) { | |
var e = $('#taigachat_message'); | |
var t = e.val(); | |
e.val(msg); | |
$('#taigachat_send').click(); |
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
var mc = require('minecraft-protocol'); | |
var server = mc.createServer({ | |
'online-mode': true, | |
host: '0.0.0.0', | |
port: 25565, | |
}); | |
server.on('login', function(client) { | |
client.write(0x01, { | |
entityId: client.id, | |
levelType: 'default', |
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 | |
$description = htmlspecialchars($description); | |
$matches = array(); | |
preg_match_all('/(\w+:\/\/)?([-\w@:]+\.)+[-\w@:]+(\/\S*)?[^)"\'»”’!?.\s]/', $description, $matches, PREG_SET_ORDER); | |
$startPos = 0; | |
foreach ($matches as $match) { | |
$pattern = $match[0]; | |
if (!isset($match[1]) || !$match[1]) { | |
$pattern = "http://{$pattern}"; |
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 | |
// Uses https://github.com/Navarr/Sockets | |
use Navarr\Socket\Socket; | |
use Navarr\Socket\Server; | |
class WebServer extends Server | |
{ | |
protected $clientMap; |
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
/** | |
* EnjinBot | |
* | |
* EnjinBot is a unique JavaScript object that allows for the instantiation | |
* and manipulation of a bot specifically for the Enjin chat system. | |
* This is not very useful, as the Enjin chat system has a very slow update | |
* time, and a very awkward update pattern. It is very likely for messages | |
* to get lost in the Enjin system, and even more likely to have response times | |
* upwards of 10 seconds or more due to Enjin's lack of update frequency. | |
* |
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
document.sendMessage = function(msg) { | |
var e = $('#chatform .chat-input'); | |
var t = e.val(); | |
e.val(msg); | |
$('#chatform input[type=submit]').click(); | |
e.val(t); | |
// Clear Variables? | |
e = t = null; | |
}; |
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
[17:43:06] <[O] Navarr>hey | |
[17:43:12] <[O] Navarr>im just here to report that the map is out of date | |
[17:43:15] <[O] Navarr>and somebody should update it | |
[17:43:15] <[P] roxie>!politics | |
[17:43:16] <LuissenTB>as soon as I get out of this snow I'm not coming back D: | |
[17:43:18] <[Staff] Mr_Darn>i REALLY think i need too. | |
[17:43:18] <bdawgthegreat>Hello! | |
[17:43:21] <[P] Scary_Assissin>i think we should stop bottering darn | |
[17:43:24] <[P] Scary_Assissin>bothering* | |
[17:43:28] <[O] Navarr>!unmute |
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
[17:43:06] <[O] Navarr>hey | |
[17:43:12] <[O] Navarr>im just here to report that the map is out of date | |
[17:43:15] <[O] Navarr>and somebody should update it | |
[17:43:39] <[Staff] Mr_Darn>Yes Navarr Sir! I'll go do that now! | |
[17:43:46] <[O] Navarr>owo;;; | |
[17:43:53] <[Staff] Mr_Darn>oh, wait, thats right, we don't update the map. | |
[17:43:57] <[O] Navarr>did i just walk in on something? | |
[17:44:24] <[O] Navarr>Darn: .. why not? | |
[17:44:41] <[Staff] Mr_Darn>because its redbanhammers map. | |
[17:44:49] <[O] Navarr>i meant the actual tiles, which are hosted by Shotbow |
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
document.sendMessage = function(msg) { | |
var e = $('#taigachat_message'); | |
var t = e.val(); | |
e.val(msg); | |
$('#taigachat_send').click(); | |
e.val(t); | |
// Clear Variables? | |
e = t = null; | |
}; |