Skip to content

Instantly share code, notes, and snippets.

<?php
function generateRandomName(bool $acii_only = true, int $max_length = 10): string {
$hc = new hhb_curl ();
$hc->_setComfortableOptions ();
$name = '';
do {
$hc->exec ( 'http://www.behindthename.com/random/random.php?number=2&gender=m&surname=&all=no&usage_myth=1&usage_fntsy=1' );
foreach ( (@DOMDocument::loadHTML ( $hc->getResponseBody () ))->getElementsByTagName ( "*" ) as $ele ) {
if ($ele->getAttribute ( 'class' ) !== 'heavyhuge') {
continue;
<?php
declare(strict_types = 1);
require_once ('hhb_.inc.php');
require_once ('exphp.php');
hhb_init ();
$dir = 'C:\Users\hanshenrik\Documents\Downloads\[AnimeNOW] Zetsuen no Tempest [BD 1080p FLAC]';
$dir = str_replace ( '\\', '/', $dir );
ex::chdir ( $dir );
$extensions = [
# Wed Sep 2 16:50:00 CST 2015
https://az412801.vo.msecnd.net/vhd/VMBuild_20141027/Parallels/IE10/Mac/IE10.Win7.For.Mac.Parallels.zip
https://az412801.vo.msecnd.net/vhd/VMBuild_20141027/Parallels/IE10/Mac/IE10.Win8.For.Mac.Parallels.zip
https://az412801.vo.msecnd.net/vhd/VMBuild_20141027/Parallels/IE11/Mac/IE11.Win7.For.Mac.Parallels.zip
https://az412801.vo.msecnd.net/vhd/VMBuild_20141027/Parallels/IE11/Mac/IE11.Win8.1.For.Mac.Parallels.zip
https://az412801.vo.msecnd.net/vhd/VMBuild_20141027/Parallels/IE6/Mac/IE6.XP.For.Mac.Parallels.zip
https://az412801.vo.msecnd.net/vhd/VMBuild_20141027/Parallels/IE7/Mac/IE7.Vista.For.Mac.Parallels.zip
https://az412801.vo.msecnd.net/vhd/VMBuild_20141027/Parallels/IE8/Mac/IE8.Win7.For.Mac.Parallels.zip
https://az412801.vo.msecnd.net/vhd/VMBuild_20141027/Parallels/IE8/Mac/IE8.XP.For.Mac.Parallels.zip
https://az412801.vo.msecnd.net/vhd/VMBuild_20141027/Parallels/IE9/Mac/IE9.Win7.For.Mac.Parallels.zip
function genderize(names,async,callback){
"use strict";
if(!async){
async=false;
}
if(!Array.isArray(names)){
names=[names];
}
if(!callback){
@divinity76
divinity76 / Darker side of Islam & Quran.txt
Last active August 3, 2016 20:23
Darker side of Islam & Quran.txt
Torture the disbelivers - http://quran.com/4/56
<?php
//playing with proc_open, making a multi-process ping, pinging all targets simultaneously
//run this on linux for best result, windows suck... see comment at http://php.net/manual/en/function.stream-set-blocking.php#110997
header("content-type: text/plain;charset=utf8");
class Process{
public $handle;
public $pipes;
public $pnum;
function __construct(){
$this->pipes=array();//
---development of this script has moved to https://github.com/divinity76/linux_speedtweaks --
// http://www.multicom.no/gaming-laptop/cat-c/c1000042
(function() {
"use strict";
var all = document.querySelectorAll("#content > table.b-parts-list > tbody > tr[valign=top]");
var clickfunc = function(ev) {
var ele = ev.target.parentNode.parentNode;
ele.nextSibling.parentNode.removeChild(ele.nextSibling);
ele.nextSibling.parentNode.removeChild(ele.nextSibling);
ele.nextSibling.parentNode.removeChild(ele.nextSibling);
ele.parentNode.removeChild(ele);
development moved to https://github.com/divinity76/bashrc/blob/master/.bashrc
@divinity76
divinity76 / getDOMDocumentFormInputs.php
Last active October 20, 2016 18:45
get inputs from forms in a DOMDocument... i've written some version of this several times without saving it x.x
<?php
function isItSafeToOnlyUseFirstFormInputMatch(DOMDocument $domd, DOMNode $form = NULL): bool {
$forms = getDOMDocumentFormInputs ( $domd, false );
foreach ( $forms as $key => $form ) {
if (count ( $form ) !== 1) {
return false;
}
foreach ( $form [0] as $key2 => $inputs ) {
if (count ( $inputs ) !== 1) {