Skip to content

Instantly share code, notes, and snippets.

View hay's full-sized avatar

Hay Kranen hay

View GitHub Profile
@hay
hay / jquery.detailsshim.js
Created December 20, 2010 16:34
A jQuery plugin that enables the behaviour of the HTML5 <details> and <summary> elements.
(function($) {
$.detailsShim = function() {
$("details").each(function() {
// Initial state of all elements in <section>
var initOpen = ($(this).attr('open') === "true") ? true : false;
$(this).children(":not(summary)").each(function() {
$(this).toggle(initOpen);
});
// Click event on <summary> toggles all elements
@hay
hay / whoisnl
Created September 27, 2010 22:25
Script to do a WHOIS for Dutch .nl domains from the terminal
#!/usr/bin/php
<?php
$domain = $argv[1];
if (!$domain) die("No domain given \n");
$domain = trim($domain);
$domain = str_replace(".nl", "", $domain);
$data = file_get_contents("https://www.sidn.nl/index.php?eID=tx_sidnwhois_pi1&domain=$domain&reg=44&det=0&lang=nl&check=true&adv=1&regmode=0");