Skip to content

Instantly share code, notes, and snippets.

View susmita-fueled's full-sized avatar

susmita-fueled susmita-fueled

View GitHub Profile
@amochohan
amochohan / 01_Laravel 5 Simple ACL manager_Readme.md
Last active April 22, 2024 17:19
Laravel 5 Simple ACL - Protect routes by an account / role type

#Laravel 5 Simple ACL manager

Protect your routes with user roles. Simply add a 'role_id' to the User model, install the roles table and seed if you need some example roles to get going.

If the user has a 'Root' role, then they can perform any actions.

Installation

Simply copy the files across into the appropriate directories, and register the middleware in App\Http\Kernel.php

@lukeredpath
lukeredpath / UITextField+RACKeyboardSupport.m
Last active April 19, 2017 10:36
ReactiveCocoa signal for keyboard done button taps
#import "UITextField+RACKeyboardSupport.h"
#import <ReactiveCocoa/RACEXTScope.h>
#import <ReactiveCocoa/NSObject+RACDescription.h>
@implementation UITextField (RACKeyboardSupport)
- (RACSignal *)rac_keyboardReturnSignal {
@weakify(self);
return [[[[RACSignal
defer:^{
@vgrichina
vgrichina / CellBackgroundView.h
Created November 12, 2012 21:39
Customizable background view for UITableViewCell in grouped table view
//
// CellBackgroundView.h
//
//
#import <UIKit/UIKit.h>
typedef enum {
CellPositionTop,
CellPositionMiddle,