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 don't think this works... | |
| echo "<td><div class='days'><span>". ($v.if(isset($arr[$v])) { echo $arr[$v]; }) . "</span></div></td>" | |
| // Try this instead.... | |
| if(isset($arr[$v])) { | |
| echo "<td><div class='days'><span>". $v.$arr[$v]; . "</span></div></td>" | |
| } else { |
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
| rvm install ruby-1.9.3-p362 --with-gcc=clang |
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 | |
| $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)); | |
| ?> |
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
| UPDATE wp_posts set post_body = replace(post_body, 'needle', 'chocolate'); |
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
| 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 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
| ssh -l USERNAME_HERE -i .ssh/yourkey.pem public-ec2-host |
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
| <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 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
| # Compiled source # | |
| ################### | |
| *.com | |
| *.class | |
| *.dll | |
| *.exe | |
| *.o | |
| *.so | |
| # Packages # |
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
| set number | |
| colorscheme desert | |
| set tabstop=4 | |
| set softtabstop=4 | |
| set shiftwidth=4 | |
| set listchars=tab:>\ ,eol:¬ |
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/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) |