View email-input.html
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> |
View command
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 |
View web.config
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> |
View launch.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
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "Spark Serve", | |
"type": "php", | |
"request": "launch", | |
"program": "${workspaceFolder}/spark", | |
"cwd": "${workspaceRoot}", | |
"args": ["serve", "-port", "4562" ], |
View app-Config-Eloquent.php
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 | |
{ |
View createTable.js
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') |
View youtube_id_regex.php
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 |
View functions.php
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>'; | |
} |
View vanilla-ajax.js
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) => { |
View settings.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
{ | |
"compile-hero.typescript-output-toggle": false, | |
"diffEditor.maxComputationTime": 0, | |
"editor.multiCursorModifier": "ctrlCmd", | |
"git.autofetch": true, | |
"git.confirmSync": false, | |
"git.enableCommitSigning": true, | |
"json.schemaDownload.enable": false, | |
"php.validate.executablePath": "", | |
"window.menuBarVisibility": "toggle", |
NewerOlder