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
sudo kill `ps -ax | grep 'coreaudiod' | grep 'sbin' |awk '{print $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
<DirectoryMatch ^.*/wp-admin/> | |
AuthType Basic | |
AuthName "Restricted Area" | |
AuthUserFile /etc/httpd/.wppass | |
Require valid-user | |
</DirectoryMatch> |
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
function formatBytes($size, $precision = 2) | |
{ | |
$base = log($size, 1024); | |
$suffixes = array('', 'k', 'M', 'G', 'T'); | |
return round(pow(1024, $base - floor($base)), $precision) . $suffixes[floor($base)]; | |
} |
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 | |
// Add ordinal suffix to day | |
function fnDay_Format($iday) | |
{ | |
if(empty($iday)) | |
die("No parameter passed to function."); | |
else | |
$iday = intval($iday); |
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 | |
/* | |
randomfile.php | |
A quickie script that will take all images in | |
current directory, back them up to ./Orig and | |
rename all files in parent directory w/ random | |
numbers. | |
Written: 12/27/2010 - Nicholas Kreidberg | |
Revised: 12/27/2010 - Nicholas Kreidberg |
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
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<meta http-equiv="Content-type" content="text/html; charset=utf-8"> | |
<title>@ Name Test</title> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script> | |
<script type="text/javascript"> | |
function fnLink() | |
{ | |
$(".twitter").each(function() |
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 | |
// Convert PostgreSQL timestamp to human readable date | |
function fnDisplay_Timestamp($sDT) | |
{ | |
// Assuming $sDT is in format: YYYY-MM-DD HH:MM:SS.MS | |
if(empty($sDT)) | |
fnErr("No parameter passed to fnDisplay_Timestamp() function."); | |
$aDT = explode(' ', $sDT); |
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 | |
/* | |
Here is an example function call, array abbreviated for the example. | |
$afields = array("Jan"=>"January", "Feb"=>"February", "Mar"=>"March); | |
echo fnDisplay_DropDown($afields, "Months", "Mar", "required"); | |
Results in: | |
<select name="Months" class="required"> | |
<option value="Jan">January</option> | |
<option value="Feb">February</option> |
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 | |
//////////////////////////////////////////////////// | |
// Written By: Nicholas Kreidberg // | |
// Revised By: Nicholas Kreidberg // | |
// Revised On: 10/01/2010 // | |
// Desc: fnSanitizePost() takes a $_POST array & // | |
// sanitizes all strings for insertion into a db. // | |
// Call: $aclean_post = fnSanitizePost($_POST); // | |
//////////////////////////////////////////////////// |
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
# | |
# Ports to listen on | |
# | |
Listen 8888 | |
# | |
# Use name-based virtual hosting. | |
# |
OlderNewer