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
See how a minor change to your commit message style can make a difference.
Tip
Take a look at git-conventional-commits , a CLI util to ensure these conventions, determine version and generate changelogs
/** | |
* @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); | |
} |
<?php | |
namespace App\Models; | |
use Illuminate\Database\ConnectionInterface; | |
use Illuminate\Database\Eloquent\Builder; | |
use Illuminate\Database\Eloquent\Model; | |
use Illuminate\Database\Eloquent\Relations\BelongsToMany; | |
class BelongsToManyInDifferentConnections extends BelongsToMany |
#!/bin/sh | |
# Copyright (C) 2009-2017 Three Nine Consulting | |
# Always good practice to update packages. However ask user if they would like to do so | |
# For explanation on how this works and why check out https://garywoodfine.com/use-pbcopy-on-ubuntu/ | |
read -p "Do you want to update your package repositories before proceeding ? " -n 1 -r | |
echo #adding new line | |
if [[ $REPLY =~ ^[Yy]$ ]] | |
then | |
sudo apt update && sudo apt upgrade -y && sudo apt autoremove -y | |
fi |
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> |