Windows 10 version 2004 (Build 10941) or higher.
Enabled Windows Subsystem for Linux feature. To enable following enter in Powershell
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
/** | |
* @param {string} eventType | |
* @param {string} selector | |
* @param {function} callback | |
*/ | |
function on(eventType, selector, callback) { | |
document.body.addEventListener(eventType, function (event) { | |
if (event.target.matches(selector)) { | |
callback.call(event.target); | |
} |
Quick tip for handling CSRF Token Expiration - common issue is when you use csrf protection is that if | |
a form sits there for a while (like a login form, but any the same) the csrf token in the form will | |
expire & throw a strange error. | |
Handling it is simple, and is a good lesson for dealing with other types of errors in a custom manner. | |
In Middleware you will see a file VerifyCsrfToken.php and be tempted to handle things there. DON'T! | |
Instead, look at your app/Exceptions/Handler.php, at the render($request, Exception $e) function. | |
All of your exceptions go through here, unless you have excluded them in the $dontReport array at the |
@mixin dropShadow($offX: 2, $offY: 2, $blur: 2, $rgba: rgba(0, 0, 0, 0.3), $hex: #B2B2B2) { | |
-webkit-filter: drop-shadow(#{$offX}px #{$offY}px #{$blur}px $rgba); | |
filter : url("data:image/svg+xml;utf8,<svg height='0' xmlns='http://www.w3.org/2000/svg'><filter id='drop-shadow'><feGaussianBlur in='SourceAlpha' stdDeviation='" + $blur +"'/><feOffset dx='" + $offX + "' dy='" + $offY + "' result='offsetblur'/><feFlood flood-color='#{$rgba}'/><feComposite in2='offsetblur' operator='in'/><feMerge><feMergeNode/><feMergeNode in='SourceGraphic'/></feMerge></filter></svg>#drop-shadow"); | |
-ms-filter : "progid:DXImageTransform.Microsoft.Dropshadow(OffX=" + $offX + ", OffY=" + $offY + ", Color='" + $hex + "')"; | |
filter : "progid:DXImageTransform.Microsoft.Dropshadow(OffX=" + $offX + ", OffY=" + $offY + ", Color='" + $hex + "')"; | |
} |
<?php | |
/* app/validators.php */ | |
Validator::extend('alpha_spaces', function($attribute, $value) | |
{ | |
return preg_match('/^[\pL\s]+$/u', $value); | |
}); | |
/* |
<?php | |
/** | |
* GetPlusOnesByURL() | |
* | |
* Get the numeric, total count of +1s from Google+ users for a given URL. | |
* | |
* Example usage: | |
* <code> | |
* $url = 'http://www.facebook.com/'; | |
* printf("The URL '%s' received %s +1s from Google+ users.", $url, GetPlusOnesByURL($url)); |
<select name="nationality"> | |
<option value="">-- select one --</option> | |
<option value="afghan">Afghan</option> | |
<option value="albanian">Albanian</option> | |
<option value="algerian">Algerian</option> | |
<option value="american">American</option> | |
<option value="andorran">Andorran</option> | |
<option value="angolan">Angolan</option> | |
<option value="antiguans">Antiguans</option> | |
<option value="argentinean">Argentinean</option> |
<?php | |
/** | |
* a PHP class for checking server status and who is connected. | |
* | |
* @author MeuhMeuh starbound.meuhmeuh.fr | |
* @copyright (c) 2013, Jeremy Villemain | |
*/ | |
class Logs{ | |
private $etat; |
#! /bin/sh | |
# Usage 1: | |
# optimize-images.sh /images/dir | |
# | |
# Usage 2: | |
# cd /images/dir | |
# optimize-images.sh | |
EXTENSIONS="jpe?g" |
#!/usr/bin/env bash | |
echo ">>> Starting Install Script" | |
# Update | |
sudo apt-get update | |
# Install MySQL without prompt | |
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password password root' | |
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password root' |