Skip to content

Instantly share code, notes, and snippets.

View ssatz's full-sized avatar
🏠
Working from home

sathish ssatz

🏠
Working from home
View GitHub Profile
@ssatz
ssatz / preg split.php
Created February 22, 2019 08:29
preg split
<?php
$e =preg_split('/(?=[\s][0-9]+)/i','Red chilli powder 2.50 tbsp');
print_r($e);
//Array ( [0] => Red chilli powder [1] => 2.50 tbsp )
@ssatz
ssatz / gist:bf8b4c96c5d41a2d83bd6b979a4998b8
Last active April 6, 2020 14:55
set timezone in Ubuntu Terminal
sudo timedatectl set-timezone Asia/Calcutta
date //will display current date and time
@ssatz
ssatz / sharethis.js
Last active January 7, 2020 08:33
Share this API for SPA
if (__sharethis__ && __sharethis__.config) {
__sharethis__.init(__sharethis__.config);
}
@ssatz
ssatz / README.md
Created May 18, 2020 13:33 — forked from hofmannsven/README.md
Notes on working with SVG on the web
@ssatz
ssatz / builder.php
Created May 24, 2020 10:49 — forked from ollieread/builder.php
Laravel query builder recursive CTE support
<?php
$recursive = $this->query()
->recursive('parents', function (Builder $query) {
$query
->select([
'*',
new Alias('slug', 'fullslug'),
new Alias(0, 'depth'),
new Alias('id', 'tree_id'),
new Alias('name', 'path'),
@ssatz
ssatz / pullrequest.md
Created July 13, 2020 14:53
PullRequest
select `email` as Email,IFNULL(SUBSTRING_INDEX(name,' ',1),"") AS "First Name",IFNULL(SUBSTRING_INDEX(name,' ',-1),"") AS "Last Name", IFNULL(CONCAT("91 ",`mobile`),"") as Phone,IFNULL(`pincode`,"") as Zip ,"IN" as Country from users left join address on address.user_id=users.id
@ssatz
ssatz / .dbs
Created May 19, 2023 07:00 — forked from raymadrona/.dbs
MySQL Replication Tuned for Laravel
simmfins
simmfins_trail