Skip to content

Instantly share code, notes, and snippets.

@skauk
skauk / README.md
Created August 28, 2018 07:37
Laravel Custom Hasher

Laravel Custom Hasher

When you need to hash and check passwords using an algorithm other than supported bcrypt or argon there is an easy way to add a custom one. When I needed to use md5 for a legacy project I have tried to quickly google a solution and most I had found were based on creating a ServiceProvider which completely overrides builtin HashManager. The other way would be to extend it instead. So I have added a following into my AuthServiceProvider's boot() method:

$this->app->make('hash')->extend('md5', function() {
    return new Md5Hasher;
});
@sparrc
sparrc / phabricator_readme.md
Last active February 6, 2025 15:57
Phabricator Ubuntu Installation Guide

Phabricator Ubuntu Installation Guide

This is a supplement to the official Phabricator Installation Guide, because their guide will leave you with all kinds of permission and config errors and ~15,000 setup issues on startup.

Install bonus packages:

# apt-get install mercurial subversion python-pygments sendmail imagemagick

Create necessary users and add phd-user to sudoers: