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
/** | |
* redirect-wrapper | |
* | |
* @param String $location | |
* @param Boolean $moved_permanently | |
*/ | |
function redirect($location, $moved_permanently = false) | |
{ | |
if (!headers_sent()) { |
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
mysqldump -u your_user --skip-comments --complete-insert --databases your_db | grep -v 'SQL SECURITY DEFINER' > ~/your_dump.sql |
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
$('p.article').each(function(index) { | |
console.log($(this).html()); | |
}); |
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 ($('#myElement').length > 0) { | |
// it exists | |
} |
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
############################################################# | |
################### OFFICIAL DEBIAN REPOS ################### | |
############################################################# | |
############### UNSTABLBE ########################### | |
# Debian sid FAQ - http://wiki.debian.org/DebianUnstable#FAQ | |
deb http://ftp.de.debian.org/debian/ sid main contrib non-free | |
deb-src http://ftp.de.debian.org/debian/ sid main contrib non-free |
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 | |
/** | |
* generate random string | |
* | |
* @param string $len length of the random string | |
* @param string $characters characters string for the random selection | |
* | |
* @return string | |
*/ |
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 | |
use Mockery as m; | |
class Swift_Bug543Test extends \PHPUnit_Framework_TestCase | |
{ | |
public $message = ''; | |
public $mailHtmlBody = ''; | |
public function embeddingImages() |
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
// ---- | |
// Sass (v3.4.7) | |
// Compass (v1.0.1) | |
// ---- | |
$breakpoints: "25.5em" "32em" "43.5em" "52.5em" "60em"; | |
@for $i from 1 through length($breakpoints) { | |
$breakpoint: nth($breakpoints, $i); | |
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 | |
//define('SECONDS_IN_A_MINUTE', 60); | |
//define('SECONDS_IN_A_HOUR', 3600); | |
//define('SECONDS_IN_A_DAY', 86400); | |
//define('SECONDS_IN_A_WEEK', 604800); | |
//define('SECONDS_IN_A_MONTH', 2592000); | |
//define('SECONDS_IN_A_YEAR', 31536000); | |
/** |
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
#* * * * * command to be executed | |
#- - - - - | |
#| | | | | | |
#| | | | +----- day of week (0 - 6) (Sunday=0) | |
#| | | +------- month (1 - 12) | |
#| | +--------- day of month (1 - 31) | |
#| +----------- hour (0 - 23) | |
#+------------- min (0 - 59) | |