Skip to content

Instantly share code, notes, and snippets.

View hay's full-sized avatar

Hay Kranen hay

View GitHub Profile
@hay
hay / dlcat.py
Created November 6, 2010 21:53
Download all images in a category on Wikimedia Commons. Requires pywikipedia
#!/usr/bin/python
# -*- coding: utf-8 -*-
# -cat:Images_from_Wiki_Loves_Monuments
import sys, os
# Set your path to pywikipedia here
sys.path.append("/Users/hay/htdocs/checkouts/pywikipedia/")
import wikipedia, config, pagegenerators
import urllib2, codecs
@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");