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
/* | |
forked from Mr. Pengi's, and added fallback to cookies if localStorage is not available, | |
also fixed a few exceptions that would rise if localStorage is not available | |
*/ | |
var ignores = null; | |
var replacementtext = "<td align='left' bgcolor='444444'>This post has been ignored</td>"; | |
$(document).ready(function () { | |
getIgnores(); | |
hideIgnores(); |
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
function beep() | |
{ | |
var audoElement=document.createElement("audio"); | |
document.body.appendChild(audoElement); | |
audoElement.addEventListener('canplaythrough',function(e){e.target.play();}); | |
audoElement.addEventListener('ended',function(e){e.target.parentNode.removeChild(e.target);}); | |
audoElement.src="http://www.soundjay.com/button/beep-7.mp3"; | |
} |
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
<?php | |
//warning: unless you know what you're doing, don't move any lines above/below init(); | |
// (using global $vars; in init() ) | |
error_reporting(E_ALL); | |
$password_to_use_script=FALSE;//password to use the script. FALSE for no password. | |
$force_unix_username=FALSE;//string if you want to hardcode a username, FALSE otherwise. | |
$force_unix_password=FALSE;//string if you want to hardcode a password, FALSE otherwise. | |
ini_set("display_errors","On"); | |
init(); | |
$vnc_connect_timeout=20;//number of seconds x11vnc +wait for a connection before exiting for security reasons. |
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
//CSS escape code ripped from Zend Framework ( https://github.com/zendframework/zf2/blob/master/library/Zend/Escaper/Escaper.php ) | |
function css_escape_string($string) | |
{ | |
$cssMatcher=function($matches) | |
{ | |
$chr = $matches[0]; | |
if (strlen($chr) == 1) { | |
$ord = ord($chr); | |
} else { | |
$chr = mb_convert_encoding($chr,'UTF-16BE','UTF-8');//$this->convertEncoding($chr, 'UTF-16BE', 'UTF-8'); |
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
#include <iostream> | |
#include <windows.h> | |
#include <Tlhelp32.h.> | |
using namespace std; | |
int main() | |
{ | |
HANDLE h= CreateToolhelp32Snapshot(8, 780); | |
if (h == INVALID_HANDLE_VALUE) { | |
throw std::runtime_error("CreateToolhelp32Snapshot failed, returning INVALID_HANDLE_VALUE"); |
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
function loadingHTML(){ | |
//771 bytes gif loading animation from https://btc-e.com/images/loading.gif | |
return '<img src="data:image/gif;base64,R0lGODlhEAAQALMMAKqooJGOhp2bk7e1rZ2bkre1rJCPhqqon8PBudDOxXd1bISCef///wAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQFAAAMACwAAAAAEAAQAAAET5DJyYyhmAZ7sxQEs1nMsmACGJKmSaVEOLXnK1PuBADepCiMg/DQ+/2GRI8RKOxJfpTCIJNIYArS6aRajWYZCASDa41Ow+Fx2YMWOyfpTAQAIfkEBQAADAAsAAAAABAAEAAABE6QyckEoZgKe7MEQMUxhoEd6FFdQWlOqTq15SlT9VQM3rQsjMKO5/n9hANixgjc9SQ/CgKRUSgw0ynFapVmGYkEg3v1gsPibg8tfk7CnggAIfkEBQAADAAsAAAAABAAEAAABE2QycnOoZjaA/IsRWV1goCBoMiUJTW8A0XMBPZmM4Ug3hQEjN2uZygahDyP0RBMEpmTRCKzWGCkUkq1SsFOFQrG1tr9gsPc3jnco4A9EQAh+QQFAAAMACwAAAAAEAAQAAAETpDJyUqhmFqbJ0LMIA7McWDfF5LmAVApOLUvLFMmlSTdJAiM3a73+wl5HYKSEET2lBSFIhMIYKRSimFriGIZiwWD2/WCw+Jt7xxeU9qZCAAh+QQFAAAMACwAAAAAEAAQAAAETZDJyRCimFqbZ0rVxgwF9n3hSJbeSQ2rCWIkpSjddBzMfee7nQ/XCfJ+OQYAQFksMgQBxumkEKLSCfVpMDCugqyW2w18xZmuwZycdDsRACH5BAUAAAwALAAAAAAQABAAAARNkMnJUqKYWpunUtXGIAj2feFIlt5JrWybkdSydNNQMLaND7pC79YBFnY+HENHMRgyhwPGaQhQotGm00oQMLBSLYPQ |
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
<?php | |
require_once('hhb_.inc.php'); | |
hhb_init(); | |
function cleanthinking() | |
{ | |
array_map('unlink', glob("THINKING/*testTHINK*")); | |
} | |
function cleanextracted() | |
{ | |
array_map('unlink', glob("extracted/*")); |
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
//untested code, and i dont really use ?>. | |
CreateDatabase.php: | |
<?php | |
$db=new PDO('sqlite:imagedb.sqlite3','','',array(PDO::ATTR_ERRMODE=>PDO::ERRMODE_EXCEPTION)); | |
$db->exec(' | |
-- DROP TABLE IF EXISTS image; | |
CREATE TABLE images( id INTEGER AUTO_INCREMENT PRIMARY KEY,filename VARCHAR(255),rawdata BLOB); | |
'); | |
//change this with your mysql or whatever |
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
var defele = document.querySelectorAll(".dc-description")[0]; | |
var fun = {}; | |
fun.name = defele.querySelector(".methodname").textContent; | |
//console.log("name is:"+fun.name); | |
fun.rettype = defele.querySelector(".type").textContent; | |
fun.returnsRealValue=(fun.rettype!=="resource" && !(defele.querySelector(".type") && defele.querySelector(".type").querySelector("a") && defele.querySelector(".type").querySelector("a").href.indexOf("pseudo-types") !== 1 )); | |
// console.log(defele.querySelector(".type").querySelector("a").href.indexOf("pseudo-types"));die(); | |
fun.parameters = []; | |
var parameters = defele.querySelectorAll(".methodparam"); | |
var i = 0; |
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
function generateNames(url, num = 10) { | |
var i = 0; | |
var results = document.createElement('div'); | |
document.body.insertBefore(results, document.body.firstChild); | |
var result; | |
var xhr; | |
var handler = function(ev) { | |
var xhr = ev.target; | |
if (xhr.readyState < 4) { | |
return; |