Skip to content

Instantly share code, notes, and snippets.

View arifulhb's full-sized avatar
Side project

Ariful Haque arifulhb

Side project
View GitHub Profile
paulund / phpcs.xml
Created August 20, 2017 16:50
PHP PSR-2 CodeSniffer Config for Laravel
View phpcs.xml
<?xml version="1.0"?>
<ruleset name="Laravel Standards">
The name attribute of the ruleset tag is displayed
when running PHP_CodeSniffer with the -v command line
argument. The description tag below is not displayed anywhere
except in this file, so it can contain information for
developers who may change this file in the future.
View .vimrc
" Allan MacGregor Vimrc configuration
set nocompatible
syntax on
set nowrap
set encoding=utf8
"""" START Vundle Configuration
JeffreyWay / .vimrc
Created January 28, 2016 05:18
Laracasts: Vim Mastery - Episode 3 .vimrc progress
View .vimrc
syntax enable
colorscheme desert
"-------------General Settings--------------"
set backspace=indent,eol,start "Make backspace behave like every other editor.
let mapleader = ',' "The default leader is \, but a comma is much better.
set number "Let's activate line numbers.
ivanvermeyen / Kernel.php
Created January 18, 2016 23:45
Find any running "queue:listen" processes for a Laravel project and kill those. Fire "php artisan queue:stop" in your "current" project root. Intended to use with a deploy script when you are using non-daemon listeners and deploy releases. If you are using daemons, run "queue:restart" instead. You can use a process monitoring tool like Superviso…
View Kernel.php
namespace App\Console;
use App\Console\Commands\StopQueueListeners;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
class Kernel extends ConsoleKernel
joecampo /
Last active November 5, 2023 17:35
fail2ban – stop HTTP(S) route abuse/brute forcing

If you're not familiar: What is fail2ban? fail2ban is an awesome linux service/monitor that scans log files (e.g. auth.log for SSH) for potentially malicious behavior. Once fail2ban is tripped it will ban users for a specified duration by adding rules to Iptables. If you're unfamiliar with fail2ban Chris Fidao has a wonderful (& free!) series about security including setting up fail2ban here.

Recently Laravel released a new feature in 5.1 to throttle authentication attempts by simply adding a trait to your authentication controller. The Laravel throttle trait uses the inputted username, and IP address to throttle attempts. I love seeing this added to a framework out of the box, but what about some of our other apps not built on Laravel? Like a WordPress login? Or even an open API etc.? Ultimately,

mandiwise / Update remote repo
Last active November 28, 2023 14:45
Transfer repo from Bitbucket to Github
View Update remote repo
// Reference:
// See also:
$ cd $HOME/Code/repo-directory
$ git remote rename origin bitbucket
$ git remote add origin
$ git push origin master
$ git remote rm bitbucket
ericlbarnes / .bowerrc
Created January 17, 2015 03:33
Laravel Elixir With Bootstrap Sass
View .bowerrc
"directory": "vendor/bower_components"
jacktasia / imgix_purge.php
Created January 4, 2015 01:45
imgix PHP purge example
View imgix_purge.php
// find your api key on the bottom of page @
define('IMGIX_API_KEY', '');
// pass the url you want to purge
function imgix_purge($url) {
$headers = array(
'Authorization: Basic '. base64_encode(IMGIX_API_KEY.':')
simonista / .vimrc
Last active December 2, 2023 10:15
A basic .vimrc file that will serve as a good template on which to build.
View .vimrc
" Don't try to be vi compatible
set nocompatible
" Helps force plugins to load correctly when it is turned back on below
filetype off
" TODO: Load plugins here (pathogen or vundle)
" Turn on syntax highlighting
syntax on
msurguy /
Last active September 8, 2023 04:07
List of open source projects made with Laravel

Other people's projects:

My projects (tutorials are on my blog at