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 | |
function checkFolderPermissions($folderPath) { | |
// Memeriksa apakah folder ada | |
if (!file_exists($folderPath)) { | |
return "Folder tidak ditemukan."; | |
} | |
// Memeriksa apakah ini adalah sebuah folder | |
if (!is_dir($folderPath)) { | |
return "Ini bukan sebuah folder."; |
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
<input type="email" name="email" value="" autocomplete="off" class="form-material-input" id="email" pattern="((?!\.)[\w\-_+.]*[^.])(@\w+)(\.\w+(\.\w+)?[^.\W])" required> |
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
**WINDOWS** | |
mklink /D "D:\project\public\uploads" "D:\project\writable\uploads" | |
**LINUX** | |
ln -s ~/project/writable/uploads ~/project/public/uploads |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<configuration> | |
<system.webServer> | |
<defaultDocument> | |
<files> | |
<add value="index.php" /> | |
</files> | |
</defaultDocument> | |
</system.webServer> | |
</configuration> |
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
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "Spark Serve", | |
"type": "php", | |
"request": "launch", | |
"program": "${workspaceFolder}/spark", | |
"cwd": "${workspaceRoot}", | |
"args": ["serve", "-port", "4562" ], |
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 | |
// app/Config/Eloquent.php | |
namespace Config; | |
use Illuminate\Database\Capsule\Manager as Capsule; | |
class Eloquent | |
{ |
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
var placeTable = document.getElementById('tableDetail') | |
// clean placeTable | |
placeTable.innerHTML = '' | |
// (C1) CREATE EMPTY TABLE | |
var table = document.createElement("table"), | |
row, cellA, cellB; | |
table.classList.add('table', 'table-bordered') |
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 | |
// Here is a sample of the URLs this regex matches: (there can be more content after the given URL that will be ignored) | |
// http://youtu.be/dQw4w9WgXcQ | |
// http://www.youtube.com/embed/dQw4w9WgXcQ | |
// http://www.youtube.com/watch?v=dQw4w9WgXcQ | |
// http://www.youtube.com/?v=dQw4w9WgXcQ | |
// http://www.youtube.com/v/dQw4w9WgXcQ | |
// http://www.youtube.com/e/dQw4w9WgXcQ | |
// http://www.youtube.com/user/username#p/u/11/dQw4w9WgXcQ |
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 | |
function defer_scripts( $tag, $handle, $src ) { | |
$defer = array( | |
'my-js' | |
); | |
if ( in_array( $handle, $defer ) ) { | |
return '<script defer src="' . $src . '" type="text/javascript"></script>'; | |
} |
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
/** | |
* Usage: | |
* makeRequest("GET", "URL_GET_JSON", { postId: 1}) | |
* .then(data => { | |
* console.log(data); | |
* }); | |
*/ | |
function makeRequest(method, url, qs_params) { | |
return new Promise((resolve, reject) => { |
NewerOlder