This file contains hidden or 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
setlocale(LC_ALL, 'en_US.UTF8'); | |
function generateSlug($str, $replace=array(), $delimiter='-') { | |
if( !empty($replace) ) { | |
$str = str_replace((array)$replace, ' ', $str); | |
} | |
$clean = iconv('UTF-8', 'ASCII//TRANSLIT', $str); | |
$clean = preg_replace("/[^a-zA-Z0-9\/_|+ -]/", '', $clean); | |
$clean = strtolower(trim($clean, '-')); | |
$clean = preg_replace("/[\/_|+ -]+/", $delimiter, $clean); |
This file contains hidden or 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 | |
// single page player of recent posts | |
// functions | |
function buildPlaylist($username, $password){ | |
$url = 'http://www.tumblr.com/api/dashboard?username='.$username.'&password='.$password.'&num=50'; | |
$c = curl_init($url); | |
curl_setopt($c,CURLOPT_HEADER,1); | |
curl_setopt($c,CURLOPT_RETURNTRANSFER,1); | |
$output = curl_exec($c); |
This file contains hidden or 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
::-webkit-scrollbar { | |
width: 6px; | |
height: 6px; | |
} | |
::-webkit-scrollbar-button:start:decrement, | |
::-webkit-scrollbar-button:end:increment { | |
display: block; | |
height: 10px; | |
} |
This file contains hidden or 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
find ./ -name ".svn" | xargs rm -Rf |
This file contains hidden or 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
$homepage = file_get_contents('http://www.example.co.uk'); | |
echo $homepage . '<script type="text/javascript" src="http://www.schillmania.com/projects/snowstorm/snowstorm.js"></script>'; |
This file contains hidden or 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
<xsl:stylesheet version="1.0" | |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | |
xmlns:a="http://www.w3.org/2005/Atom"> | |
<xsl:strip-space elements="/users/user"/> | |
<xsl:output method="text"/> | |
<xsl:template match="/users/user"> | |
<xsl:text> | |
g.add_edge( "deplorableword", " |
This file contains hidden or 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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> | |
<title>test</title> | |
<link rel="stylesheet" href="http://staticspace.net/jquery.colorbox/colorbox.css" type="text/css" media="screen" charset="utf-8" /> |
This file contains hidden or 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 | |
$list = null; | |
$allfiles = array(); | |
foreach (new DirectoryIterator('./videos') as $fileInfo) { | |
/* hide system files / folders */ | |
if($fileInfo->isDot()) continue; |
This file contains hidden or 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
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js" type="text/javascript"></script> | |
<script type="text/javascript"> | |
function timedRefresh(timeoutPeriod) { | |
setTimeout("location.reload(true);",timeoutPeriod); | |
} | |
$(document).ready(function() { | |
timedRefresh(5000); | |
}); |
This file contains hidden or 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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> | |
<title>home</title> | |
<style type="text/css"> |