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
set tabstop=4 | |
set softtabstop=4 | |
set shiftwidth=4 | |
" textmate like set invisibles. | |
" ctrl-v u25b8 for ▸ and ctrl-v u00ac for ¬ | |
set listchars=tab:▸\ ,eol:¬ | |
set list | |
set nohls |
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 a VBox VM # | |
==================== | |
VBoxManage createvm --name "Ubuntu 10.10 Server" --register | |
VBoxManage modifyvm "Ubuntu 10.10 Server" --memory 256 --acpi on --boot1 dvd --nic1 bridged --bridgeadapter1 eth0 | |
VBoxManage createhd --filename Ubuntu_10_10_Server.vdi --size 10000 | |
VBoxManage storagectl "Ubuntu 10.10 Server" --name "IDE Controller" --add ide | |
VBoxManage storageattach "Ubuntu 10.10 Server" --storagectl "IDE Controller" --port 0 --device 0 --type hdd --medium Ubuntu_10_10_Server.vdi | |
VBoxManage storageattach "Ubuntu 10.10 Server" --storagectl "IDE Controller" --port 1 --device 0 --type dvddrive --medium /home/ubuntu-10.10-server-amd64.iso |
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
#! /bin/sh | |
# /etc/init.d/blah | |
# | |
# Some things that run always | |
touch /var/lock/blah | |
# Carry out specific functions when asked to by the system | |
case "$1" in | |
start) |
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
set number | |
colorscheme desert | |
set tabstop=4 | |
set softtabstop=4 | |
set shiftwidth=4 | |
set listchars=tab:>\ ,eol:¬ |
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
# Compiled source # | |
################### | |
*.com | |
*.class | |
*.dll | |
*.exe | |
*.o | |
*.so | |
# Packages # |
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
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteRule ^css/(.*) public/css/$1 [L] | |
RewriteRule ^js/(.*) public/js/$1 [L] | |
RewriteRule ^img/(.*) public/img/$1 [L] | |
RewriteRule ^font/(.*) public/font/$1 [L] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule ^(.*)$ bootstrap.php [QSA,L] | |
</IfModule> |
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
ssh -l USERNAME_HERE -i .ssh/yourkey.pem public-ec2-host |
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
if(!function_exists('get_the_content_first_paragraph')) : | |
function get_the_content_first_paragraph() { | |
$content = get_the_content(); | |
$content = apply_filters('the_content', $content); | |
$content = str_replace(']]>', ']]>', $content); | |
$content_explode = explode("</p>", $content); | |
$c = 0; $p = count($content_explode); $return_data = ""; | |
while($c < $p) { | |
$test = strip_tags($content_explode[$c]); |
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
UPDATE wp_posts set post_body = replace(post_body, 'needle', 'chocolate'); |
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 | |
$now = time() + 26888; // or your date as well | |
//$now2 = $now + 26888; | |
$your_date = strtotime("2013-01-14"); | |
$datediff = $your_date - $now; | |
echo ceil($datediff/(60*60*24)); | |
?> |
OlderNewer