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
$filteredQuery=array( | |
'filtered'=>array( | |
'query'=>array( | |
'query_string'=>array('query'=>'enveloperecipients:*@domain.com* AND result:0 AND NOT remoteip:10.1.1.*') | |
), | |
'filter'=>array( | |
'range'=>array( | |
'recvtime'=>array('from'=>'2013-07-01','to'=>'2013-07-31') | |
) | |
), |
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
// Get current language | |
$_rcmail->config->get('language'); | |
// |
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
/** | |
Usage | |
Example URL: | |
http://www.example.com/index.php?id=1&image=awesome.jpg | |
Calling getQueryVariable("id") - would return "1". | |
Calling getQueryVariable("image") - would return "awesome.jpg". | |
*/ |
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 | |
// @source: http://www.paulund.co.uk/resize-image-class-php | |
/** | |
* Resize image class will allow you to resize an image | |
* | |
* Can resize to exact size | |
* Max width size while keep aspect ratio | |
* Max height size while keep aspect ratio | |
* Automatic while keep aspect ratio |
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 | |
// @source: http://www.paulund.co.uk/force-download-of-files-in-php | |
function downloadFile($file){ | |
$file_name = $file; | |
$mime = 'application/force-download'; | |
header('Pragma: public'); // required | |
header('Expires: 0'); // no cache | |
header('Cache-Control: must-revalidate, post-check=0, pre-check=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
kbd { | |
padding: .1em .6em; | |
border: 1px solid #ccc; | |
font-size: 11px; | |
font-family: Arial,Helvetica,sans-serif; | |
background-color: #f7f7f7; | |
color: #333; | |
-moz-box-shadow: 0 1px 0 rgba(0,0,0,0.2),0 0 0 2px #fff inset; | |
-webkit-box-shadow: 0 1px 0 rgba(0,0,0,0.2),0 0 0 2px #fff inset; | |
box-shadow: 0 1px 0 rgba(0,0,0,0.2),0 0 0 2px #fff inset; |
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
# Add this func. to your .bashrc | |
function ext-ip () { curl http://ipecho.net/plain; echo; } |
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
$ chkconfig --list | grep $(runlevel | awk '{ print $2}'):on |
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 removeNonAsciiChars($str) | |
{ | |
return preg_replace('/[[:^print:]]/','',$str); | |
} |
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
.caret{ | |
/* down-arrow begin */ | |
display: inline-block; | |
width: 0; | |
height: 0; | |
vertical-align: middle; | |
border-top: 4px solid #000000; | |
border-right: 4px solid transparent; | |
border-left: 4px solid transparent; | |
content: ""; |