Skip to content

Instantly share code, notes, and snippets.

View relliv's full-sized avatar
no time for caution

Eyüp relliv

no time for caution
View GitHub Profile
@relliv
relliv / class-naming-convention.md
Created November 29, 2022 11:27 — forked from whizark/class-naming-convention.md
HTML/CSS Class Naming Convention #html #css #sass
@relliv
relliv / cookies.js
Last active May 28, 2022 18:01 — forked from InfamousStarFox/cookies.js
JavaScript cookie helper
/**
* Cookie utility
*
* @source https://gist.github.com/InfamousStarFox/cd246a19dcc3fec3d4e84176bb803e6d
*/
var cookie = {
get: function (cookieName) {
var cookie = document.cookie.split(";").find(function (item) {
return item.trim().startsWith(cookieName + '=');
});
@relliv
relliv / ReadableNumberHelper.php
Last active March 2, 2021 13:09 — forked from mauro-baptista/NumberFormat.php
Easily readable numbers with custom locale
<?php
namespace App\Helpers;
/**
* Numbers more readable for humans
* It intends to change numbers as 1000 as 1K or 1200000 as 1.2M
* This code is heavly base in this one: https://gist.github.com/RadGH/84edff0cc81e6326029c
* How to use \NumberFormat::readable(1000);
*