This file contains hidden or 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
// https://gist.github.com/dblandin/2991970 | |
Alabama | |
Alaska | |
American Samoa | |
Arizona | |
Arkansas | |
California | |
Colorado | |
Connecticut |
This file contains hidden or 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
Paste this Code in Validator.php | |
public function validateAlphaSpaces($attribute, $value, $params) | |
{ | |
return preg_match('/^[\pL\s]+$/u', $value); | |
} | |
Create Custom Message some where at bottom in Validation.php | |
/* |
This file contains hidden or 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
the reported geolocation info of a domain URL fast with this quick #oneliner: | |
curl -s ipinfoโ.io/`dig +short exampleโ.com` | tr -d '",{}' |
This file contains hidden or 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
(\ autocomplete\=\")([a-z\-0-9\_\"]+) |
This file contains hidden or 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
$('.reveal').on('click', function() { | |
var reveal = '.' + $(this).attr('id'), // reveal's id *should* be to-be-revealed's class | |
type = $(reveal).attr('type') === 'password' ? 'text' : 'password'; | |
$(reveal).attr('type', type); | |
}); |
This file contains hidden or 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
(value\=\"\{\{\ old\(\')([a-z\-\_]+)(\')(\)\ \}\}\") | |
usage: $1$2$3\,\ \$variableObject\->$2$4 | |
works as long as: | |
$2 is the same key as the column name (or whatever is in the object coming back) | |
see https://regex101.com/r/DfQngW/1 |
This file contains hidden or 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 | |
$timezones = array( | |
'America/Adak' => '(GMT-10:00) America/Adak (Hawaii-Aleutian Standard Time)', | |
'America/Atka' => '(GMT-10:00) America/Atka (Hawaii-Aleutian Standard Time)', | |
'America/Anchorage' => '(GMT-9:00) America/Anchorage (Alaska Standard Time)', | |
'America/Juneau' => '(GMT-9:00) America/Juneau (Alaska Standard Time)', | |
'America/Nome' => '(GMT-9:00) America/Nome (Alaska Standard Time)', | |
'America/Yakutat' => '(GMT-9:00) America/Yakutat (Alaska Standard Time)', | |
'America/Dawson' => '(GMT-8:00) America/Dawson (Pacific Standard Time)', |
This file contains hidden or 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
(\s*)([^=^\s]*)\s*=\s*(.*); | |
$1$3 = $2; |
This file contains hidden or 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
SELECT * FROM KEY_COLUMN_USAGE WHERE REFERENCED_TABLE_NAME = 'table_name' AND REFERENCED_COLUMN_NAME = 'id' |
This file contains hidden or 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 | |
/* | |
* this will generate a valid v4 UUID per Google's directive for use in the -sessiontoken- parameter | |
*/ | |
function guidv4($data) | |
{ | |
assert(strlen($data) == 16); | |
$data[6] = chr(ord($data[6]) & 0x0f | 0x40); // set version to 0100 | |
$data[8] = chr(ord($data[8]) & 0x3f | 0x80); // set bits 6-7 to 10 |
NewerOlder