Skip to content

Instantly share code, notes, and snippets.

View ManojKiranA's full-sized avatar
🔍
Focusing

Manoj Kiran ManojKiranA

🔍
Focusing
  • Postiefs Technologies Private Limited
  • Coimbatore
View GitHub Profile
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\Gate;
use Illuminate\Support\Facades\Schema;
use Illuminate\Support\Facades\Blade;
use App\Models\Permission;
@ManojKiranA
ManojKiranA / whois.php
Last active December 2, 2018 02:48
Php Script to display the whois lookup inforamtion
/**
* @function whois
* @author Manojkiran
* @contact manojkiran10031998@gmail.com
* @param string $domain
* @usage Displays the whois information form given domain Name
* @version 1.3
**/
/*
|--------------------------------------------------------------------------
<?php
/**
* Dumps a given variable along with some additional data.
*
* @param mixed $var
* @param bool $pretty
*/
function dd($var, $pretty = false)
{
@ManojKiranA
ManojKiranA / php_url_parse.php
Created December 13, 2018 08:53 — forked from xoptgah/php_url_parse.php
PHP url snipp #PHP
<?php
// Examples for URL: https://example.com/subFolder/yourfile.php?var=blabla#12345
//built-in function
$x = parse_url($url);
$x['scheme'] 🡺 https
$x['host'] 🡺 example.com (or with WWW)
$x['path'] 🡺 /subFolder/yourfile.php
$x['query'] 🡺 var=blabla
$x['fragment'] 🡺 12345 // hashtag outputed only in case, when hashtag-containing string was manually passed to function, otherwise PHP is unable to recognise hashtags in $_SERVER
@ManojKiranA
ManojKiranA / git-tag-delete-local-and-remote.sh
Created March 18, 2019 15:39 — forked from mobilemind/git-tag-delete-local-and-remote.sh
how to delete a git tag locally and remote
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName
@ManojKiranA
ManojKiranA / error_blade_directive.php
Created March 29, 2019 22:25 — forked from calebporzio/error_blade_directive.php
A little Blade directive to make working with validation errors a bit nicer.
<?php
// Usage:
// Before
@if ($errors->has('email'))
<span>{{ $errors->first('email') }}</span>
@endif
// After:
@ManojKiranA
ManojKiranA / README.md
Created April 2, 2019 08:00 — forked from shgysk8zer0/README.md
Generate random images in PHP

Generate random images in PHP

sample

Why?

  • Because you can
  • Because you have time to spare
  • Maybe you think they look cool or want to save them for wallpapers or something
  • Maybe it reminds you of that one time... You know which time I'm talking about

Requirements

@ManojKiranA
ManojKiranA / ActiveMenus.php
Last active April 2, 2019 08:43
Setting the Active Menu in laravel (i have moved all the functions to my laravel package you can download it form here https://github.com/ManojKiranA/Aktiv)
<?php
use Illuminate\Support\Facades\Route;
class ActiveMenus
{
/**
* @function isRouteActive
* @author Manojkiran
* @contact manojkiran10031998@gmail.com
@ManojKiranA
ManojKiranA / phpresult.txt
Created June 1, 2019 13:02 — forked from linkimfly/phpresult.txt
The effect you want
desc:
In addition, if the current time is less than 30 minutes from endhour, expired is also counted as expired.
Array
(
[0] => Array
(
[date] => 2019-06-01
[week] => Saturday
[subdate] => 06-01
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Collective\Html\{FormFacade as Form , HtmlFacade as Html};
class FormMacroServiceProvider extends ServiceProvider
{
/**