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
// {{{ Flush User Cache | |
public function flushCache($user_id) | |
{ | |
$this->cache->delete('USER-' . $user_id); | |
} | |
// }}} |
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 | |
if ($module_data['buyers']) | |
{ | |
?> | |
<h4>Customer Map</h4> | |
<div id="map_canvas" style="width:310px;height:310px"></div><br /> | |
<script src="http://maps.google.com/maps?file=api&v=2&sensor=true&key=<?=$config->google['maps'];?>" type="text/javascript"></script> | |
<?=Utility::dynamicJavascript('gmaps/markermanager');?> | |
<?=Utility::dynamicJavascript('clusterer/Clusterer2');?> | |
<script type="text/javascript"> |
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
bcp "SELECT * FROM BargainBee_Production.INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'AdminUser' " queryout "c:\temp\DB\Header-AdminUser.txt" -t@**@ -c -T; | |
bcp "SELECT * FROM BargainBee_Production.INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'BillingInfo' " queryout "c:\temp\DB\Header-BillingInfo.txt" -t@**@ -c -T; | |
bcp "SELECT * FROM BargainBee_Production.INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'City' " queryout "c:\temp\DB\Header-City.txt" -t@**@ -c -T; | |
bcp "SELECT * FROM BargainBee_Production.INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'Deal' " queryout "c:\temp\DB\Header-Deal.txt" -t@**@ -c -T; | |
bcp "SELECT * FROM BargainBee_Production.INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'DealLocations' " queryout "c:\temp\DB\Header-DealLocations.txt" -t@**@ -c -T; | |
bcp "SELECT * FROM BargainBee_Production.INFORMATION_S |
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 | |
if (false); | |
{ | |
// Fuck me, this runs!!! | |
} | |
?> |
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 sortMarketDeals($a, $b) | |
{ | |
$a = $a['started_at']; | |
$b = $b['started_at']; | |
if ($a == $b) | |
{ | |
return 0; |
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
#!/bin/bash | |
echo "Press [CTRL+C] to exit..."; echo | |
os=${OSTYPE//[0-9.]/} | |
if [[ "$os" == "linux-gnu" ]]; | |
then | |
speak="espeak -v english-us" | |
elif [[ "$os" == "darwin" ]]; |
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
# Block empty blocked or whitelisted referers | |
location ~ ^/gallery/(\d+)/(\d+)/(\d+)-(\d+)-(\d+)\.(.+)$ | |
{ | |
valid_referers none blocked scenekids.com ~(google.|yahoo.|bing.|facebook.|fbcdn.); | |
if ($invalid_referer) | |
{ | |
return 403; | |
} | |
} |
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
RewriteRule ^(cgi-bin|level)(.+)?$ /index.php?request=404 [NC,L] |
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 | |
// I... hurt my self today | |
// TODO this isn't good mojo | |
$comment = new StatusComment(); | |
$comments = array(); | |
foreach ($statuses as $status) | |
{ | |
$comments[$status['id']] = count($comment->getComments($status['id'])); |
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
#!/bin/bash | |
for file in `find .` | |
do | |
EXTENSION="${file##*.}" | |
if [ "$EXTENSION" == "php" ] || [ "$EXTENSION" == "phtml" ] | |
then | |
RESULTS=`php -l $file` |