Skip to content

Instantly share code, notes, and snippets.

View arifulhb's full-sized avatar

Ariful Haque arifulhb

View GitHub Profile
paulund / phpcs.xml
Created August 20, 2017 16:50
PHP PSR-2 CodeSniffer Config for Laravel
<?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.
" 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
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…
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 May 25, 2024 14:17
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 May 28, 2024 03:03
Transfer repo from Bitbucket to Github
// 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
"directory": "vendor/bower_components"
jacktasia / imgix_purge.php
Created January 4, 2015 01:45
imgix PHP purge example
// 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 June 14, 2024 18:06
A basic .vimrc file that will serve as a good template on which to build.
" 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 April 30, 2024 15:14
List of open source projects made with Laravel

Other people's projects:

My projects (tutorials are on my blog at