Skip to content

Instantly share code, notes, and snippets.

View jharil's full-sized avatar
🎯
Focusing

Williams Jharil jharil

🎯
Focusing
View GitHub Profile
<alignment jcr:primaryType="nt:unstructured"
name="./alignChildren"
fieldLabel="Alignment of components"
required="{Boolean}true"
selectionMode="single"
sling:resourceType="granite/ui/components/coral/foundation/form/buttongroup">
<items jcr:primaryType="nt:unstructured">
<default jcr:primaryType="nt:unstructured"
name="./default"
@jharil
jharil / detect-utf8.php
Created May 20, 2019 18:05 — forked from GromNaN/detect-utf8.php
How to detect UTF-8 string in PHP
<?php
function isUtf8($string)
{
return preg_match('%(?:'
. '[\xC2-\xDF][\x80-\xBF]' // non-overlong 2-byte
. '|\xE0[\xA0-\xBF][\x80-\xBF]' // excluding overlongs
. '|[\xE1-\xEC\xEE\xEF][\x80-\xBF]{2}' // straight 3-byte
. '|\xED[\x80-\x9F][\x80-\xBF]' // excluding surrogates
. '|\xF0[\x90-\xBF][\x80-\xBF]{2}' // planes 1-3
@jharil
jharil / .env
Created July 18, 2018 17:42 — forked from drafie/.env
Lumen Mail Amazon SES AWS
# Mail
MAIL_DRIVER: 'ses'
SES_KEY: 'xxxxxxxxxxxxxx'
SES_SECRET: 'xxxxxxxxxxxxxxxxxxxxx'
SES_REGION: 'xxxxxxxxxxxxxxxx'
@jharil
jharil / cloudSettings
Last active February 18, 2020 00:52 — forked from remmel/facebook-messenger-bot.php
Basic example of a Facebook Messenger Bot
{"lastUpload":"2020-02-18T00:52:42.135Z","extensionVersion":"v3.4.3"}