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
/* | |
Selection with category page, | |
then newxt action | |
*/ | |
if($current_category_id == '70'){ | |
if (SHOW_BANNERS_GROUP_SET11 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET11)) { | |
if ($banner->RecordCount() > 0) { | |
?> | |
<div id="bannerNine" class="banners"><?php echo zen_display_banner('static', $banner); ?></div> | |
<?php |
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
- Check in Database | |
select * from configuration where configuration_key LIKE 'SHOW_BANNERS_GROUP_SET%'; | |
- Insert new _BANNER_GROUP_ , before you must identification group_id | |
INSERT INTO `yourdatabasename`.`configuration` ( | |
`configuration_id` , | |
`configuration_title` , | |
`configuration_key` , | |
`configuration_value` , |
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
Viral: customizer.php (inc/customizer.php) | |
-------------------------------------------- | |
from : | |
'category1' => array( | |
'type' => 'category', | |
-------------------------------------------- | |
to : | |
'category1' => array( |
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 | |
$start = strtotime("now"); | |
$end = strtotime("last day of a month"); | |
$getMonday= array(); | |
$datelistMonday=""; | |
$Monday= strtotime("Sunday", $start); | |
while($Monday <= $end) { | |
$getMonday[] .=',"'.date("Y-m-d",$Monday).'"'; | |
$Monday= strtotime("+1 weeks", $Monday); | |
} |
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 | |
for ($i=1;$i<=sizeof($dateListGen_2)-1;$i++){ | |
for ($j=$i;$j<sizeof($dateListGen_2);$j++){ | |
if ($dateListGen_2[$i-1]>$dateListGen_2[$j]){ | |
$temp = $dateListGen_2[$i-1]; | |
$dateListGen_2[$i-1] = $dateListGen_2[$j]; | |
$dateListGen_2[$j] = $temp; | |
} | |
} | |
} |
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
[ubuntu] | |
- boot, tekan e | |
- di 'ro' ganti menjadi 'rw init=/bin/bash' | |
[_ Ubuntu 14.04 and above _] | |
# apt list --installed | |
[_ Older Versions _] | |
# dpkg --get-selections | grep -v deinstall |
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 textLength(text,value){ | |
var maxLength; | |
if(text == 'cc'){ | |
maxLength = 16; | |
}else if(text == 'ccc') { | |
maxLength = 4; | |
} | |
if(value.length > maxLength) return false; | |
return true; | |
} |
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
$define("DIR_FS_LOGS","logs") | |
$log folder = DIR_FS_LOGS . '/'; | |
$debug_file = 'name_file_log' . time(); | |
file_put_contents($log_folder . $debug_file . '_' . 'text' . '.txt', $json_response, FILE_APPEND); |
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
- hubungkan ssh dengan terminal | |
> eval $(ssh-agent -s) | |
- pilih ssh key | |
> ssh-add ~/.ssh/id_rsa | |
#bukan public tapi private | |
#akses privat 600 |
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
Scape slashes is simply use \ before / and it will be escaped. (\/=> /). | |
Otherwise you're regex DD/MM/YYYY could be next: | |
/^[0-9]{2}[\/]{1}[0-9]{2}[\/]{1}[0-9]{4}$/g | |
Explanation: | |
[0-9]: Just Numbers | |
{2} or {4}: Length 2 or 4. You could do {2,4} as well to length between two numbers (2 and 4 in this case) |