This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Ismo Vuorinen <ismo@ivuorinen.net>, 2014 | |
SCRIPTNAME=`basename $0` | |
# If no directory is given, work in local dir | |
if [ "$1" = "" ]; then | |
DIR="." | |
else | |
DIR="$1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* makeSafeEntities() | |
* | |
* Convert str to UTF-8 (if not already), then convert that to HTML named | |
* entities and numbered references. | |
* Compare to native htmlentities() function. Unlike that function, | |
* this will skip any already existing entities in the string. | |
* | |
* - mb_convert_encoding() doesn't encode ampersands, so use |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once("tunar.php"); | |
$tunar = tunar( "drifter9000" ); | |
?><pre><?php print_r( $tunar ); ?></pre> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Fetch the quota to temp file, grab the data and delete the file | |
system("quota -s > q.txt"); | |
$raw_quota = file("q.txt"); | |
unlink("q.txt"); | |
$raw_quota = trim( $raw_quota[3] ); | |
$raw_quota = str_replace(" ", " ", $raw_quota); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* directory insides as cute listing | |
*/ | |
$me = __FILE__; | |
$dir = dirname($me); | |
$files = scandir($dir); | |
$req = $_SERVER['SERVER_NAME'].($_SERVER['REQUEST_URI']); | |
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{if segment_1} | |
{if segment_1 == 'archive'} | |
{segment_3}/{segment_2} — Arkistot — | |
{if:elseif segment_1 == 'about'} | |
Tietoja — | |
{if:elseif segment_1 == 'categories'} | |
{exp:query sql="SELECT cat_name FROM exp_categories WHERE cat_url_title = '{segment_3}'"}{cat_name}{/exp:query} — Kategoria — | |
{if:elseif segment_1 == 'notebook' OR segment_1 == 'photos' OR segment_1 == 'links' OR segment_1 == 'videos' OR segment_1 == 'quotes'} | |
{if segment_2}{exp:channel:entries limit="1" channel='{segment_1}'}{title}{/exp:channel:entries} —{/if} | |
{exp:channel:entries limit="1" channel='{segment_1}'}{channel}{/exp:channel:entries} — |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Fetch the quota to temp file, grab the data and delete the file | |
system("quota -s > q.txt"); | |
$raw_quota = file("q.txt"); | |
unlink("q.txt"); | |
$raw_quota = trim( $raw_quota[3] ); | |
$raw_quota = str_replace(" ", " ", $raw_quota); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$p = "http://www.hs.fi/fingerpori/"; | |
$p = file_get_contents($p); | |
preg_match_all('/\<img id="strip([0-9]+)" src="http:\/\/www.hs.fi\/kuvat\/iso_webkuva\/([0-9]+).jpeg" align="center" border="0" alt="" title=""\>/', $p, $m); | |
$img = $m[0][0]; | |
if( empty($img) ) { | |
preg_match_all('/\<img id="strip([0-9]+)" src="http:\/\/www.hs.fi\/kuvat\/iso_webkuva\/([0-9]+).gif" align="center" border="0" alt="" title=""\>/', $p, $m); | |
$img = $m[0][0]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$obj = 0-> | |
title-> Koko | |
options-> l = L | |
xl = XL | |
xxl = XXL | |
1-> | |
title-> Väri | |
options-> musta = Musta | |
vihrea = Vihreä |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
User-agent: * | |
Disallow: / |
OlderNewer