This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.
Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).
type CamelCase<S extends string> = S extends `${infer P1}_${infer P2}${infer P3}` | |
? `${Lowercase<P1>}${Uppercase<P2>}${CamelCase<P3>}` | |
: Lowercase<S> | |
type KeysToCamelCase<T> = { | |
[K in keyof T as CamelCase<string & K>]: T[K] | |
} | |
type CamelToSnakeCase<S extends string> = S extends `${infer T}${infer U}` ? |
const crypto = require('crypto'); | |
const { promisify } = require('util'); | |
const express = require('express'); | |
const asyncify = require('express-asyncify'); | |
const session = require('express-session'); | |
const createFileStore = require('session-file-store'); | |
const nodemailer = require('nodemailer'); | |
const nodemailerSendgrid = require('nodemailer-sendgrid'); | |
const bodyParser = require('body-parser'); | |
const pass = require('passport'); |
This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.
Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).
function dateRange( $first, $last, $step = '+1 day', $format = 'Y/m/d' ) { | |
$dates = array(); | |
$current = strtotime( $first ); | |
$last = strtotime( $last ); | |
while( $current <= $last ) { | |
$dates[] = date( $format, $current ); | |
$current = strtotime( $step, $current ); |
<?php | |
// app/Helpers | |
namespace App\Helpers; | |
use Illuminate\Support\HtmlString; | |
use Illuminate\Support\Str; | |
class VueCli | |
{ |
// Set the date we're counting down to | |
var countDownDate = new Date("2020-03-28 08:24:25").getTime(); | |
// Update the count down every 1 second | |
var x = setInterval(function() { | |
// Get today's date and time | |
var now = new Date().getTime(); | |
// Find the distance between now and the count down date |
// ES6 | |
var queryString = Object.keys(params).map(key => key + '=' + params[key]).join('&'); | |
const queryString = Object.keys(params).map(function(key) { | |
return key + '=' + params[key] | |
}).join('&'); | |
// ES5 | |
var queryString = Object.keys(params).map(function(key) { | |
return key + '=' + params[key] | |
}).join('&'); |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
#Removes access to the system folder by users. | |
#Additionally this will allow you to create a System.php controller, | |
#previously this would not have been possible. | |
#'system' can be replaced if you have renamed your system folder. | |
RewriteCond %{REQUEST_URI} ^system.* | |
RewriteRule ^(.*)$ /index.php?/$1 [L] |
const mix = require('laravel-mix'); | |
const path = require("path"); | |
const MiniCssExtractPlugin = require('mini-css-extract-plugin'); | |
const _root = path.resolve(__dirname, "."); | |
const rootPath = function(args) { | |
args = Array.prototype.slice.call(arguments, 0); | |
return path.join.apply(path, [_root].concat(args)); | |
}; |
select * from | |
(select adddate('1970-01-01',t4.i*10000 + t3.i*1000 + t2.i*100 + t1.i*10 + t0.i) selected_date from | |
(select 0 i union select 1 union select 2 union select 3 union select 4 union select 5 union select 6 union select 7 union select 8 union select 9) t0, | |
(select 0 i union select 1 union select 2 union select 3 union select 4 union select 5 union select 6 union select 7 union select 8 union select 9) t1, | |
(select 0 i union select 1 union select 2 union select 3 union select 4 union select 5 union select 6 union select 7 union select 8 union select 9) t2, | |
(select 0 i union select 1 union select 2 union select 3 union select 4 union select 5 union select 6 union select 7 union select 8 union select 9) t3, | |
(select 0 i union select 1 union select 2 union select 3 union select 4 union select 5 union select 6 union select 7 union select 8 union select 9) t4) v | |
where selected_date between '2018-10-29' and '2018-11-01'; |