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
########################### | |
# provided by skookum.com # | |
########################### | |
# A VirtualHost entry open to Port 80 | |
<VirtualHost *:80> | |
# The email address of your server admin | |
ServerAdmin corey@skookum.com | |
# The path to your Wordpress base installation directory | |
DocumentRoot /var/www/vhosts/skookum.com/html |
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 | |
/** | |
* This class is our wrapper class to fix the | |
* inherent slowness of the parent class | |
*/ | |
class Clean extends Sanitize { | |
public static function xss($string) | |
{ | |
// base case | |
if (!preg_match('/[^a-zA-Z0-9_\-.\s?!,]/', $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
// makes me cry | |
messageListener:function(d){ | |
if(d.hasOwnProperty("msgid")){return;} | |
if(d.command=="speak"){ | |
this.showChatMessage(d.userid,d.name,d.text); | |
}else{ | |
if(d.command=="newsong"){ | |
if(this.sjEUHqPqB.time_left>10){ | |
turntablePlayer.playEphemeral(UI_SOUND_ENDSONG,true); | |
} |
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
var _room; | |
var _manager; | |
/** | |
* Function to retrieve turntable objects. | |
*/ | |
function getTurntableObjects() { | |
// reset room | |
_room = null; |
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
cd /opt | |
wget http://framework.zend.com/releases/ZendFramework-1.11.10/ZendFramework-1.11.10.tar.gz | |
tar -xvf ZendFramework-1.11.10.tar.gz | |
cd ZendFramework-1.11.10 | |
echo "alias zf='export ZF_CONFIG_FILE=~/.zf.ini; /opt/ZendFramework-1.11.10/bin/zf.sh'" >> ~/.bash_profile | |
source ~/.bash_profile |
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 sortString(&$s) { | |
$s = str_split($s); | |
sort($s); | |
$s = implode($s); | |
} | |
// example usage prints: | |
// 1223344789aaaaadddefffffhhhiillllnnoorrsssuuuuwyy | |
$string = 'ouhlasfuywernhlasdfoulnarfiuyadf1234987234sdfailh'; |
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('./spf30.php'); | |
if (!empty($_POST)) { | |
try { | |
// this is an example of the form data before decryption | |
var_dump($_POST); | |
// run validation on the submitted email form | |
spam::validate($_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
// example one - remove class if a match is found at the beginning | |
$elem = $('#elemToMatch'); | |
$.each($elem.getMatchingClass('*=classBeginsWith_'), function() { | |
$elem.removeClass(this); | |
}); | |
// example two - perform an action if a match is found at the end | |
// note this is not a very good method for showing and hiding | |
// child elements and is only used as an example | |
$('#elemToMatch').click(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
console.time(); | |
var str = ''; | |
for (var i = 0; i < 1000; i++) { | |
str += i; | |
} | |
console.timeEnd(); |
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
<link rel="stylesheet" type="text/css" media="screen" href="http://www.yoursite.com/css/canvas.css?v=1.2" /> | |
<div id="container"> | |
<!-- AS AN EXAMPLE, WE'LL STYLE THE FB SHARE BUTTON --> | |
<fb:share-button class="url" href="http://www.your-site-url.com" /> | |
</div> |
OlderNewer