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 | |
$dir = '.'; | |
if( $handle = opendir( $dir ) ) { | |
while( false !== ( $entry = readdir( $handle ) ) ) { | |
if( preg_match( '/.html/', $entry ) ) { | |
echo "$entry\n"; | |
} | |
} | |
closedir( $handle ); | |
} |
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 | |
function str_replace_once( $str_pattern, $str_replacement, $string ){ | |
if( strpos( $string, $str_pattern ) !== false ) | |
{ | |
$occurrence = strpos( $string, $str_pattern ); | |
return substr_replace( $string, $str_replacement, strpos( $string, $str_pattern ), strlen( $str_pattern ) ); | |
} | |
return $string; | |
} |
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 | |
class Date { | |
public static function ago( $time ) { | |
$time = time() - 25; | |
$periods = array( 'second', 'minute', 'hour', 'day', 'week', 'month', 'year', 'decade' ); | |
$lengths = array('60','60','24','7','4.35','12','10'); | |
$now = time(); | |
$difference = $now - $time; |
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 | |
/** | |
* Validate registration data for our system | |
* | |
* @param array | |
* @param boolean | |
* @return Redirect with array | |
*/ | |
public function post_register( $data = NULL, $email_confirm = true ) { | |
if( !empty( $data ) ) // Directly set the data so we can use it as normal |
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 | |
/* | |
Plugin Name: Theme Updater | |
Plugin URI: https://github.com/UCF/Theme-Updater | |
Description: A theme updater for GitHub hosted Wordpress themes. This Wordpress plugin automatically checks GitHub for theme updates and enables automatic install. For more information read <a href="https://github.com/UCF/Theme-Updater/blob/master/readme.markdown">plugin documentation</a>. | |
Author: Douglas Beck | |
Author: UCF Web Communications | |
Version: 1.3.4 | |
*/ |
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 | |
class Crud_Base_Controller extends Base_Controller { | |
// Yes, i want restfull, god yesssss | |
public $restful = true; | |
public function __construct() | |
{ | |
// This is required in order to bring in functionality from laravel. |
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
/** | |
* The first commented line is your dabblet’s title | |
*/ | |
background: #f06; | |
background: linear-gradient(45deg, #f06, yellow); | |
min-height: 100%; |
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
/** | |
* CSS3 Animated Flames * | |
Improved version using the 'steps' attribute to control the sprite switching | |
*/ | |
body {background-color:#000} | |
#logfire { | |
position:relative; | |
background:url(http://sitepointstatic.com/examples/css3/animation/logfire.jpg?r=2) center top no-repeat; |
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
<pre> | |
SMIL Information: | |
<?php | |
// RTMP URL | |
define( "RTMP_URL", "rtmp://glc.us.com/vod" ); | |
// Video Directory. | |
//define( "VIDEO_DIR", realpath( dirname( __FILE__ ) . "/glcmedia/video/" ) ); | |
// Manual | |
define( "VIDEO_DIR", realpath( "/Server/www/GLC/glc.us.com/trunk/glcmedia/video" ) ); |
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
############################################################# | |
# File: cronjobs.sh | |
# Description: List crontab for all users on machine | |
# | |
# Supported OS: Ubuntu, should work with other distributions | |
# | |
# Author: Eric Percifield | |
# http://www.tge-studio.com | |
# | |
############################################################# |
OlderNewer