Skip to content

Instantly share code, notes, and snippets.

View farindra's full-sized avatar

Farindra farindra

View GitHub Profile

This is a simple instruction to use Tabler in your next Laravel project.

(Tabler is a beautiful dashboard: https://tabler.io/)

How to install:

  1. first of all run content of gistfile1.txt in your Laravel project.
  2. Copy tabler.js to recourses/js.
  3. Copy tabler.scss to resources/sass.
  4. Replace webpack.mix.js with your current webpack.mix.js
@farindra
farindra / AccessToken.php
Created October 10, 2020 21:46 — forked from onamfc/AccessToken.php
Add Custom Claims to Passport 8 / Laravel 6
<?php
namespace App\Passport;
use App\User;
use Lcobucci\JWT\Builder;
use Lcobucci\JWT\Signer\Key;
use League\OAuth2\Server\CryptKey;
use Lcobucci\JWT\Signer\Rsa\Sha256;
use Laravel\Passport\Bridge\AccessToken as BaseToken;
// basic implementation, where pivot is the first element
function quickSortBasic(array) {
if(array.length < 2) {
return array;
}
var pivot = array[0];
var lesserArray = [];
var greaterArray = [];
@farindra
farindra / key.md
Created February 12, 2019 14:13
FREE IntelliJ IDEA key 2018.2!

READ or DIE

  • put 0.0.0.0 account.jetbrains.com into your hosts file (C:\Windows\System32\drivers\etc\hosts or /etc/hosts)
  • for GayOS macOS read that
  • use the key below
K71U8DBPNE-eyJsaWNlbnNlSWQiOiJLNzFVOERCUE5FIiwibGljZW5zZWVOYW1lIjoibGFuIHl1IiwiYXNzaWduZWVOYW1lIjoiIiwiYXNzaWduZWVFbWFpbCI6IiIsImxpY2Vuc2VSZXN0cmljdGlvbiI6IkZvciBlZHVjYXRpb25hbCB1c2Ugb25seSIsImNoZWNrQ29uY3VycmVudFVzZSI6ZmFsc2UsInByb2R1Y3RzIjpbeyJjb2RlIjoiSUkiLCJwYWlkVXBUbyI6IjIwMTktMDUtMDQifSx7ImNvZGUiOiJSUzAiLCJwYWlkVXBUbyI6IjIwMTktMDUtMDQifSx7ImNvZGUiOiJXUyIsInBhaWRVcFRvIjoiMjAxOS0wNS0wNCJ9LHsiY29kZSI6IlJEIiwicGFpZFVwVG8iOiIyMDE5LTA1LTA0In0seyJjb2RlIjoiUkMiLCJwYWlkVXBUbyI6IjIwMTktMDUtMDQifSx7ImNvZGUiOiJEQyIsInBhaWRVcFRvIjoiMjAxOS0wNS0wNCJ9LHsiY29kZSI6IkRCIiwicGFpZFVwVG8iOiIyMDE5LTA1LTA0In0seyJjb2RlIjoiUk0iLCJwYWlkVXBUbyI6IjIwMTktMDUtMDQifSx7ImNvZGUiOiJETSIsInBhaWRVcFRvIjoiMjAxOS0wNS0wNCJ9LHsiY29kZSI6IkFDIiwicGFpZFVwVG8iOiIy
@farindra
farindra / LICENCE SUBLIME TEXT
Created February 4, 2019 08:17
Sublime Text 3 Serial key build is 3176
## Sublime Text 3 Serial key build is 3176
> * Added these lines into /etc/hosts
127.0.0.1 www.sublimetext.com
127.0.0.1 license.sublimehq.com
> * Used the license key
----- BEGIN LICENSE -----
@farindra
farindra / alias.cmd
Created April 11, 2018 05:58 — forked from jatubio/alias.cmd
Alias to develop on Windows with Laravel
@echo off
:::: Commands ::::
:: DosKey ::
:: Creates a new alias
doskey dk=doskey $*
:: Lists current aliases
doskey dkm=doskey /macros
@farindra
farindra / calcprime.php
Created November 6, 2017 13:57 — forked from lawlesst/calcprime.php
PHP functions for calculating prime numbers.
<?php
/**
* Check to see if a given integer is prime.
*
* Adapted from this Python implementation http://pthree.org/2007/09/05/prime-numbersin- python/
* This list of the first 10,000 prime numbers is also helpful http://primes.utm.edu/lists/small/10000.txt
*
* @param int $number the number to check to see if it is prime.
* @return boolean true if the number is prime, false if not.
@farindra
farindra / php-ping.php
Created July 1, 2017 02:10 — forked from k0nsl/php-ping.php
PHP ping script
<?php
/*
*
* Use the examples below to add your own servers. Coded by clone1018 [?]
*
*/
$title = "Simple Server Status"; // website's title
$servers = array(
'Google Web Search' => array(