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 | |
# mengurangi hari | |
$tgl = "2022-03-02"; | |
$date = date("Y-m-d", strtotime($tgl."-10 days")); | |
echo $date; // 2022-02-20 | |
# menambah hari | |
$tgl = "2022-03-02"; | |
$date = date("Y-m-d", strtotime($tgl."+10 days")); |
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 | |
# mengurangi tanggal 7 hari | |
$date = date("Y-m-d", strtotime("-7 days")); | |
echo $date; | |
# menambah tanggal 7 hari | |
$date = date("Y-m-d", strtotime("+7 days")); | |
echo $date; |
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
const routes = [ | |
{ | |
path: "/", | |
redirect: "/dashboard", | |
component: () => import("../views/themes/dashboard"), | |
meta:{ | |
requiresAuth: 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Bottom Navbar Bootstrap</title> | |
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"> | |
<style type="text/css"> | |
svg{ | |
color: white; |
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 | |
$kd_manual = createBase32Key(); | |
$tokenkey = helperb322hex($kd_manual); | |
$qrcode = helperhex2b32($tokenkey); | |
$backupcode = "123456789012345"; | |
$init = [ | |
"tokenkey" => $tokenkey, | |
"tokentype" => "TOTP", |
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
v-add-letsencrypt-domain [username] [domainname.com] | |
// change [username] with your name of user | |
// change [domainname.com] with domain what you want to add ssl |
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
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> | |
<script src="main.js"></script> | |
<link href="style.css"> | |
<div class="left"> | |
<div class="js_scrollTo">test1</div> | |
<div class="js_scrollTo">test2</div> | |
<div class="js_scrollTo">test3</div> | |
</div> | |
<div class="right"> |
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 am use ext .js because if i use .vue doesn't higlihgt | |
computed: { | |
listenSelectMessage() { | |
return this.$store.state.staffChat._searchMessage.selected; | |
}, | |
}, | |
watch:{ | |
listenSelectMessage: function (baru, lama) { | |
console.log(baru, lama) | |
// event here |
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 | |
// please place this script to index.php in root folder | |
// in first line after open tag php | |
header('Access-Control-Allow-Origin: *'); | |
header("Access-Control-Allow-Methods: GET, POST, PUT, PATCH, DELETE, OPTIONS"); | |
header("Access-Control-Allow-Headers: X-API-KEY, Origin, X-Requested-With, Content-Type, Accept, Access-Control-Request-Method,Access-Control-Request-Headers, Authorization"); | |
if ($_SERVER['REQUEST_METHOD'] == "OPTIONS") { | |
header("HTTP/1.1 200 OK"); | |
die(); |
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
window.addEventListener('message', function(e) { | |
// Get the sent data | |
const data = e.data; | |
// If you encode the message in JSON before sending them, | |
// then decode here | |
// const decoded = JSON.parse(data); | |
}); |