These are the most useful Regular Expressions that I find myself using on a regular basis
Test to see if a string is a valid website address or not.
<select> | |
<option value="AL">Alabama</option> | |
<option value="AK">Alaska</option> | |
<option value="AZ">Arizona</option> | |
<option value="AR">Arkansas</option> | |
<option value="CA">California</option> | |
<option value="CO">Colorado</option> | |
<option value="CT">Connecticut</option> | |
<option value="DE">Delaware</option> | |
<option value="DC">District Of Columbia</option> |
/* | |
This .scss loop will create "margin helpers" and "padding helpers" for use in your web projects. | |
It will generate several classes such as: | |
.m-r-10 which gives margin-right 10 pixels. | |
.m-r-15 gives MARGIN to the RIGHT 15 pixels. | |
.m-t-15 gives MARGIN to the TOP 15 pixels and so on. | |
.p-b-5 gives PADDING to the BOTTOM of 5 pixels | |
.p-l-40 gives PADDING to the LEFT of 40 pixels |
/** | |
* Create a Symfony response for the given exception. | |
* | |
* @param \Exception $e | |
* @return mixed | |
*/ | |
protected function convertExceptionToResponse(Exception $e) | |
{ | |
if (config('app.debug')) { | |
$whoops = new \Whoops\Run; |
$mobile: 768px !default; | |
$tablet: 769px !default; | |
$desktop: 1024px !default; | |
$widescreen: 1216px !default; | |
$fullhd: 1408px !default; | |
// Mobile Devices Only | |
// (0 - 768px) | |
@mixin mobile { | |
@media only screen and (max-width: $mobile) { |
# | |
# REQUIRES: | |
# - server (the forge server instance) | |
# - event (the forge event instance) | |
# - sudo_password (random password for sudo) | |
# - db_password (random password for database user) | |
# - callback (the callback URL) | |
# |
# FORGE CONFIG (DO NOT REMOVE!) | |
include forge-conf/cms.jacurtis.com/before/*; | |
server { | |
root /home/forge/cms.jacurtis.com/public; | |
index index.php index.html index.htm; | |
server_name cms.jacurtis.com; | |
# FORGE SSL (DO NOT REMOVE!) | |
# ssl_certificate; |
git branch -D `git branch | grep 'ard_*'` |
# The file that does the voodoo magic | |
# Inspired by: | |
# - https://stackoverflow.com/questions/35869985/datetime-datetime-is-not-json-serializable | |
# - https://gist.github.com/jeffbrl/67eed588f2d32afcaf3bf779bd91f7a7 | |
import json | |
import datetime | |
def pretty_print(data): | |
print(json.dumps(data, default=__datetime_handler, indent=4)) |
<!-- This is the main Blade file that you want your components to show up in --> | |
<!DOCTYPE html> | |
<html lang="{{ config('app.locale') }}"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>Laravel</title> |