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
## Free memory percentage per node | |
(((node_memory_MemFree_bytes + node_memory_Cached_bytes + node_memory_Buffers_bytes)/node_memory_MemTotal_bytes)*100) * on(instance) group_left(nodename) (node_uname_info) |
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
package payment; | |
interface PaymentProvider{ | |
public void pay(); | |
} | |
class Balea implements PaymentProvider{ | |
@Override | |
public void pay() { |
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
$(function() { | |
$('textarea').each(function(index, obj) { | |
if(obj.name.indexOf('_ar') != -1) { | |
tinymce.init({selector: "[name="+ obj.name + "]", 'directionality': 'rtl'}); | |
} else { | |
tinymce.init({selector: "[name="+ obj.name + "]", 'directionality': 'ltr'}); | |
} | |
}); | |
}); |
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
/** | |
* Read url parameters | |
* | |
* @link http://stackoverflow.com/a/901144/5734037 | |
*/ | |
var getUrlParameter = function (name, url) { | |
if (!url) url = window.location.href; | |
name = name.replace(/[\[\]]/g, "\\$&"); | |
var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"), | |
results = regex.exec(url); |
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
/** | |
* Read url parameters | |
* | |
* @link http://stackoverflow.com/a/901144/5734037 | |
*/ | |
var getUrlParameter = function (name, url) { | |
if (!url) url = window.location.href; | |
name = name.replace(/[\[\]]/g, "\\$&"); | |
var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"), | |
results = regex.exec(url); |
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
/** | |
* Upload multiple images to parse | |
* @author Alaa Attya <[email protected]> | |
* | |
* @param {Arrya} file_elements | |
* @param {function} callback | |
* @return {void} | |
*/ | |
function upload_parse_images(file_elements, callback) { |
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 | |
$start = "2016-03-1"; | |
$end = "2016-03-20"; | |
$dates_in_between = array(); | |
while($start <= $end) { | |
array_push($dates_in_between, $start); | |
$start = date('Y-m-d', strtotime($start . " +1 day")); | |
} |
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
$nbe = array( | |
'Title' => 'E7gezly', | |
'vpc_AccessCode' => Configure::read('Payment.vpc_AccessCode'), | |
'vpc_Amount' => $this->request->data['Order']['total_amount'] * 100, | |
'vpc_Command' => 'pay', | |
'vpc_Locale' => Configure::read("Config.language") == "ara" ? 'ar' : 'en', | |
'vpc_MerchTxnRef' => $this->Order->id, | |
'vpc_Merchant' => Configure::read('Payment.vpc_merchant'), | |
'vpc_OrderInfo' => "TMT_ORDER" . $this->Order->id, | |
'vpc_ReturnURL' => Router::url(array('language' => Configure::read("Config.language"), 'plugin' => 'events', 'controller' => 'book', 'action' => 'nbe_call_back'), true), |