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 | |
// a function to check if a specific header exists, current way due to headers_list() returning numeric array | |
function header_exists($lookup) | |
{ | |
$headers = headers_list(); | |
foreach($headers as $header){ | |
if(0 !== stripos($header, $lookup)){ // or other lookup... | |
continue; | |
}else{ | |
return true; |
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
$(function(){ | |
var seek = false, volume = false, _playing = false, muted = false, _playlist, _songID = 0, oldposition = 0, largeplaylist; | |
function getRandomNumber(range){ | |
return Math.floor(Math.random() * range); | |
} | |
function getRandomChar(){ | |
var chars = "0123456789abcdefghijklmnopqurstuvwxyzABCDEFGHIJKLMNOPQURSTUVWXYZ"; | |
return chars.substr( getRandomNumber(62), 1 ); |
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 | |
// matches <br>, <br/>, <br />, \n, \r | |
$pattern = '/(<br(\/|\s\/)?>|\n|\r)/'; |
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 | |
/** | |
* Returns a string containing var_dump() for each argument wrapped in a <pre> | |
* | |
* @author joltmode | |
* @return string | |
*/ | |
function dump() | |
{ |
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 | |
function array_push_after(&$array, $key, array $value) | |
{ | |
$keys = array_keys($array); | |
$_keyPosition = array_search($key, $keys); | |
// TODO: Fix indexed value | |
$array = array_slice($array, 0, $_keyPosition + 1, true) + $value + array_slice($array, $_keyPosition, count($array) - $_keyPosition, true); |
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 | |
function is(&$variable, $filters) | |
{ | |
$filters = explode('|', $filters); | |
$state = false; | |
foreach ($filters as $filter) | |
{ |
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 | |
/** | |
* CIDR.php | |
* | |
* Utility Functions for IPv4 ip addresses. | |
* | |
* @author Jonavon Wilcox <[email protected]> | |
* @version Sat Jun 6 21:26:48 EDT 2009 | |
* @copyright Copyright (c) 2009 Jonavon Wilcox | |
*/ |
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
#chart | |
{ | |
width: 90%; | |
margin: 0 auto; | |
min-height: 350px; | |
} |
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 | |
/** @append */ | |
/* | |
|-------------------------------------------------------------------------- | |
| Require project specific logic separation files | |
|-------------------------------------------------------------------------- | |
| | |
| Next we will load files that help us to separate some logic, therefore | |
| keep the application as readable and consistent as possible. | |
| |
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
#coding: utf8 | |
#################################### IMPORTS ################################### | |
# Std Libs | |
import re | |
import subprocess | |
import sys | |
from os.path import normpath |
OlderNewer