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 phplint() { | |
for f in `ls *.php` | |
do | |
php -l ${f} | |
done | |
} | |
function rphplint() { | |
for f in `find . -iname '*.php'` | |
do |
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 | |
/** | |
* Peeks at the first element of an array. Optionally returns the first key | |
* if the 2nd parameter is set to true. | |
* | |
* @param Array $arr | |
* @param Boolean $returnKey | |
* @return Mixed $val | |
*/ | |
function array_peek($arr, $key = false) { |
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 | |
/** | |
* See if it's an autoreply | |
* $message is of type Zend_Mail_Message | |
*/ | |
$autoreply = false; | |
try { | |
if ($message->{'X-Autoreply'}) { | |
$autoreply = 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
Name | |
Type | |
Description | |
Beard Bonus | |
Paul Buchheit | |
More Than Just The Gmail Guy | |
Paul's a CWRU grad. We put him on here to try to get him to give a talk or interview at the CWRU Hacker Society. So, Paul, if you see this please email [email protected]! | |
John McCarthy |
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
ln -s /usr/lib/liblua5.1.so /usr/lib/liblua.so |
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 | |
find . -name "*.php" -exec grep "base64" '{}' \; -print &> b64-detections.txt | |
find . -name "*.php" -exec grep "eval" '{}' \; -print &> eval-detections.txt |
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
-- I think I fixed all of the bugs, but there may be one. | |
-- Now I just need to see about some optimization | |
SELECT | |
n.city, | |
n.zip_code, | |
n.latitude, | |
n.longitude, | |
3958.75587 * c AS distance | |
FROM ( | |
SELECT |
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 | |
# generates a list of files with changes | |
diff -r DIRECTORY1 DIRECTORY2 | grep ^diff | cut -d' ' -f3 |
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
/* | |
Copyright (c) 2010, Yahoo! Inc. All rights reserved. | |
Code licensed under the BSD License: | |
http://developer.yahoo.com/yui/license.html | |
version: 3.2.0 | |
build: 2676 | |
Modified by zyoung | |
*/ | |
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td{margin:0;padding: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 | |
# the hack attempt inserts <ads> tags into files | |
find . -exec grep "<ads>" '{}' \; -print &> ads-detections | |
# most of the files tend to be .js.php | |
find . -print | grep ".js.php" &> js-php-detections |