Skip to content

Instantly share code, notes, and snippets.

View rydurham's full-sized avatar

Ryan Durham rydurham

View GitHub Profile
@ericlbarnes
ericlbarnes / bower.json
Last active January 8, 2024 01:52
Gulp, Bower, Bootstrap Sass, FontAwesome
{
"name": "project",
"version": "0.0.0",
"authors": [
"Eric Barnes <me@example.org>"
],
"license": "MIT",
"private": true,
"ignore": [
"**/.*",
@lukaswhite
lukaswhite / ClearBeanstalkdQueueCommand.php
Last active March 20, 2023 08:11
Clear a Beanstalkd Queue in Laravel
<?php
use Illuminate\Console\Command;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputArgument;
class ClearBeanstalkdQueueCommand extends Command {
/**
@Ardakilic
Ardakilic / User.php
Last active January 25, 2016 16:52
To find all unbanned/unsuspended users with Sentry 2 using Laravel 4, try this method:
<?php
class User extends Cartalyst\Sentry\Users\Eloquent\User {
/**
* @author Arda Kılıçdağı,
* @param $orderBy string how to order
* @param $sortBy string Sort like Ascending or Descending, values are asc/desc
* @param $toArray boolean whether to return the output as array or not. Default is false
*
@leabdalla
leabdalla / Laravel Sentry 2 with multiple user types.md
Last active February 10, 2024 10:57
Laravel Sentry 2 with multiple user types, finally.

Sentry is an amazing auth system. But I really need a feature: multiple user types in the same app. And I cannot separate those in groups, because they have different table columns. After 2 days burning my head, I think I found a good solution. The magic is duplicate SentryServiceProvider with new different settings.

This was tested on Laravel 4.0 and Sentry 2. If you're using other version of Sentry, my suggestion is to follow same steps from this gist but use your local files instead copying files from here.

Lets suppose we have a fresh Sentry install with default User ambient. Now we want another ambient called Admin, with new model and different settings. How to do:

1. One model, one ambient

@fideloper
fideloper / vhost.py
Last active January 25, 2024 23:37
Create vHost Ubuntu Lamp-Server (bash and python)
#! /usr/bin/python
from sys import argv
from os.path import exists
from os import makedirs
from os import symlink
from os import system
import getopt
#