Source: Laravel Eloquent Relationship
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
<h1>Hello</h1> | |
<p>This is a very important data</p> | |
<!-- Tolong anggap tag script di bawah adalah lingkungan NodeJS, | |
karena saat saya melakukan web scraping saya menggunakan bantuan NodeJS --> | |
<script> | |
// Untuk mendapatkan teks "Hello" dan "This is a very important data" | |
const valueFromH1 = document.querySelector('h1').textContent; | |
const valueFromP = document.querySelector('p').textContent; | |
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
pm.test("response is ok", function () { | |
pm.response.to.have.status(200); | |
}); | |
// Old postman | |
var jsonData = JSON.parse(responseBody); | |
// New postman | |
var data = pm.response.json(); |
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
server { | |
listen 80; | |
listen [::]:80; | |
# SSL configuration | |
# | |
# listen 443 ssl default_server; | |
# listen [::]:443 ssl default_server; | |
# | |
# Note: You should disable gzip for SSL traffic. |
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
<head> | |
<!-- CSS --> | |
<link rel="preload" href="{{ $styles.RelPermalink }}" as="style" onload="this.onload=null;this.rel='stylesheet'"> | |
<!-- Firefox will load this because of it doesn't support preload yet! --> | |
<link rel="stylesheet" href="{{ $styles.RelPermalink }}" media="screen"> | |
</head> |
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
{ | |
"editor.fontSize": 16, | |
"editor.fontFamily": "'Roboto Mono', Consolas, 'Courier New', monospace", | |
"editor.lineHeight": 40, | |
"editor.suggestLineHeight": 20, | |
"git.autofetch": true, | |
"git.enableSmartCommit": true, | |
} |
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
customers = ["kresna", "satya", "dyah", "nugraha"] | |
# Mengakses semua nama pelanggan? | |
for name in customers: | |
# print() ini dieksekusi di dalam for karena di bawa menjorok ke dalam | |
print(f"Nama pelanggan: {name}") | |
# print di bawah tidak di eksekusi di dalam for | |
print("aku di luar for") |
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 | |
namespace App\Http\Middleware; | |
use Illuminate\Auth\Middleware\Authenticate as Middleware; | |
class Authenticate extends Middleware | |
{ | |
/** | |
* Get the path the user should be redirected to when they are not authenticated. |
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 | |
namespace App\Http\Middleware; | |
use Closure; | |
use \Firebase\JWT\JWT; | |
class CheckOauth2Token | |
{ | |
/** |
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
<script> | |
document.onreadystatechange = function () { | |
if (document.readyState === 'complete') { | |
// Init library or something else | |
new Choices('#topicSpeaker', { | |
removeItemButton: true, | |
}); | |
} | |
} | |
</script> |