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
#/etc/httpd/conf/extra/httpd-vhosts.conf | |
NameVirtualHost *:80 | |
<VirtualHost *:80> | |
ServerName {hostname} | |
ProxyRequests Off | |
ProxyPreserveHost On | |
<Proxy *> |
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 | |
/** | |
* @author dukeofgaming | |
* @param string $path The path where the files with the classes are located (1 class per file always) | |
* @param function $rule Callback that receives the file name as parameter and returns the class name | |
*/ | |
function autoloadPath($path,$rule=null){ | |
$absolute_path = dirname(__FILE__).DS.$path; | |
$files = array_filter( | |
scandir($absolute_path), |
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 | |
/* | |
/com_mycomponent | |
|-/views | |
| |-/response | |
| |-/tmpl | |
| | |-default.php | |
| | |-index.html | |
| |-view.raw.php | |
*/ |
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
Taken from http://six.vh.paanjoyhost.cn/?p=288: | |
Annotations Cycling [annotations-cycling] | |
Beep [beep] | |
Collapse All [collapse-all-folds] | |
Collapse All Java Code [collapse-all-code-block-folds] | |
Collapse All Javadoc [collapse-all-javadoc-folds] | |
Collapse Fold [collapse-fold] | |
Comment [comment] | |
Copy [copy-to-clipboard] |
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
#Taken from: | |
# http://stevelosh.com/blog/2009/05/what-i-hate-about-mercurial/#hg-rm-is-a-confusing-mess | |
#Here’s part of the help for the hg rm command: | |
# This only removes files from the current branch, | |
# not from the entire project history. -A can be | |
# used to remove only files that have already been | |
# deleted, -f can be used to force deletion, and | |
# -Af can be used to remove files from the next |
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
/*Taken from: http://flipc.blogspot.com/2009/02/damn-ie7-and-inline-block.html*/ | |
div.content_block{ | |
display: inline-block; /*The way other browsers work correctly*/ | |
/*IE7*/ | |
zoom: 1; /*Meaningless for other than IE*/ | |
*display: inline; /*Asterisk parse hack, ignored by smarter browsers*/ | |
_height: Xpx; /*IE6 only parse hack, where X is the desired height*/ | |
} |
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
#Taken from http://movabletripe.com/archive/recursively-chmod-directories-only/ | |
find . -type f -exec chmod 644 {} \; | |
find . -type d -exec chmod 755 {} \; |
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 Object{ | |
//... | |
private static $singletons = array(); | |
public static function &singleton(){ | |
$class = get_called_class(); | |
if(!array_key_exists($class, self::$singletons)){ | |
self::$singletons[$class] = new $class(); | |
} | |
return self::$singletons[$class]; |
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
#Create bootable drive, via: http://thelazyadmin.com/blogs/thelazyadmin/archive/2009/01/08/installing-windows-7-via-usb-or-sd-media.aspx | |
diskpart | |
list disk (find the disk number for the removable media) | |
select disk # | |
clean | |
create partition primary | |
select partition 1 | |
active | |
format fs=fat32 quick |
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
#Taken from http://dpaste.de/61O8/ | |
set -e | |
echo "Encrypting $2 for $1." | |
# make a directory to store results for this site | |
mkdir -p results/$1 | |
# get that site's SSL certificate, validating it with the cacert.pem we have |
NewerOlder