Skip to content

Instantly share code, notes, and snippets.

@HansF
HansF / iRailphpwrapper.php
Created September 10, 2010 16:21
php wrapper for iRail api
<?php
//
// php wrapper for iRail, by Hans Fraiponts
// licence http://www.gnu.org/licenses/gpl-3.0.html
// More info here : http://project.irail.be/cgi-bin/trac.fcgi/wiki/ApiSpecification
//
function listStations (){
$xml = simplexml_load_file("http://api.irail.be/stations.php");
@HansF
HansF / PamToTwit.php
Created December 22, 2010 17:03
Input from macs.php, output linked profile images. example: http://fanatic.be/twit/
<?php
$url = "http://0x20.be/pam/macs";
if ($fp = fopen($url, 'r')) {
$output = '';
while ($line = fgets($fp, 1024)) {
$content .= $line;
}
$Twitternames = parseContent ($content);
if (is_array($Twitternames)) $output = generateHtml ($Twitternames);
@HansF
HansF / show.php
Created July 30, 2011 23:23
Simulation for Monty Hall Dilemma
<?php
/*
Suppose you're on a game show, and you're given the choice of three
doors. Behind one door is a car, behind the others, goats. You pick
a door, say number 1, and the host, who knows what's behind the
doors, opens another door, say number 3, which has a goat.
He says to you, "Do you want to pick door number 2?"
Is it to your advantage to switch your choice of doors?
Craig. F. Whitaker
Columbia, MD
@HansF
HansF / fgdfgd
Created June 11, 2012 22:20 — forked from Themaister/gist:2913060
fdgdfg
#define RETRO_ENVIRONMENT_GET_SYSTEM_DIRECTORY 9
// const char ** --
// Returns the "system" directory of the frontend.
// This directory can be used to store system specific ROMs such as BIOSes, configuration data, etc.
// The returned value can be NULL.
// If so, no such directory is defined,
// and it's up to the implementation to find a suitable directory.
@HansF
HansF / nl.php
Created September 25, 2012 21:43 — forked from anonymous/nl.php
te vertalen
<?php
/**
* cms_cancel_account nederlandse language file
*/
$english = array(
'cms_cancel_account:cancelaccount' => 'Account wissen',
'cms_cancel_account:askreason' => 'Explain the reason of your account cancellation:',
'cms_cancel_account:button:request' => 'Request cancellation',
'cms_cancel_account:invalidrequest' => 'Another pending cancellation request already exists for this account',
%windir%\explorer.exe %LOCALAPPDATA%

Keybase proof

I hereby claim:

  • I am hansf on github.
  • I am hansf (https://keybase.io/hansf) on keybase.
  • I have a public key whose fingerprint is 7D8D EDF4 A807 DA5C CBD3 5EAB 9A69 2A1E 881E 3C21

To claim this, I am signing this object:

0xeea555795c0af2f32f52e68665dd80076b8c425a
{
"glossary": {
"title": "example glossary",
"GlossDiv": {
"title": "S",
"GlossList": {
"GlossEntry": {
"ID": "SGML",
"SortAs": "SGML",
"GlossTerm": "Standard Generalized Markup Language",
0xb5bE50680154C11f4Be748F65DB4acD83A9D8dc8