Skip to content

Instantly share code, notes, and snippets.

View icodebuster's full-sized avatar
💭
I may be slow to respond.

Jobin Kurian icodebuster

💭
I may be slow to respond.
View GitHub Profile
@icodebuster
icodebuster / Xdebug.md
Created February 24, 2018 19:35 — forked from vicgonvt/Xdebug.md
Instructions for Installing Xdebug in a Mac with Laravel, Valet and Sublime Text

NOTE: This assumes that you have Valet, Homebrew, Sublime Text and PHP properly installed and functioning and will only focus on the setup and installation and setup of Xdebug. There are other tutorials that go into great depth explaining how to get those tools installed on your mac.

Let's get started right away!

Installing Xdebug

You need to know which version of PHP you are running in your machine. To do so, from the terminal run the command php -v and this will display something like this

PHP 7.0.14 (cli) (built: Dec  8 2016 23:34:17) ( NTS )
@icodebuster
icodebuster / response.php
Created October 4, 2016 06:41 — forked from Sentences/response.php
Laravel Response extend for inline displaying of images
<?php
use Laravel\File;
/**
* Put this in laravels libraries dir and make sure to
* remove Response in /config/application.php
* This file will be autoloaded by default.
*
* @author Nico R <lt500r@gmail.com>
*/
class Response extends \Laravel\Response
@icodebuster
icodebuster / vhost.py
Created August 26, 2016 09:06 — forked from fideloper/vhost.py
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
#
@icodebuster
icodebuster / xc
Created August 20, 2016 08:02 — forked from subdigital/xc
Open the first Xcode workspace or project found
xcode_proj=`find . -name "*.xc*" -d 1 | sort -r | head -1`
if [ `echo -n $xcode_proj | wc -m` == 0 ]
then
echo "No xcworkspace/xcodeproj file found in the current directory."
exit 1
fi
echo "Found $xcode_proj"
open $xcode_proj
@icodebuster
icodebuster / Sublime Text 3 Build 3103 License Key - CRACK
Created August 10, 2016 06:57
Sublime Text 3 Build 3103 License Key - CRACK
I use the first
—– BEGIN LICENSE —–
Michael Barnes
Single User License
EA7E-821385
8A353C41 872A0D5C DF9B2950 AFF6F667
C458EA6D 8EA3C286 98D1D650 131A97AB
AA919AEC EF20E143 B361B1E7 4C8B7F04
@icodebuster
icodebuster / 01_Laravel 5 Simple ACL manager_Readme.md
Created July 13, 2016 20:47 — forked from amochohan/01_Laravel 5 Simple ACL manager_Readme.md
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

@icodebuster
icodebuster / RandomArray.h
Created December 31, 2015 07:19
Random Array of numbers passed and get consecutive number range
NSMutableArray *randomNumbersArray;
randomNumbersArray = [NSMutableArray arrayWithObjects:@(1),@(2),@(4),@(6),@(9),@(11),@(12),@(14),@(15),@(21),@(22),@(23),@(24),@(25),@(27),@(28),@(30),@(31),@(33),@(35),@(36), @(41), @(40), nil];
- (NSArray *)getConsecutiveArray:(NSArray *)originalArray {
NSInteger startNumber, endNumber;
NSMutableArray *finalArray = [NSMutableArray array];
for (int index = 0; index < originalArray.count; index++) {
@icodebuster
icodebuster / Block in Objective-C.txt
Last active December 28, 2015 23:09
How Do I Declare A Block in Objective-C? http://fuckingblocksyntax.com/
How Do I Declare A Block in Objective-C?
http://fuckingblocksyntax.com/
https://developer.apple.com/library/ios/documentation/cocoa/conceptual/ProgrammingWithObjectiveC/WorkingwithBlocks/WorkingwithBlocks.html
As a local variable:
returnType (^blockName)(parameterTypes) = ^returnType(parameters) {...};
As a property:
- (IBAction)btnTouchEvent:(id)sender
{
__block NSString *str;
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Rename" message:@"Enter new file name" delegate:nil cancelButtonTitle:@"Cancel" otherButtonTitles:@"OK", nil];
alert.delegate = alert;
[alert setAlertViewStyle:UIAlertViewStylePlainTextInput];
alert.shouldEnableFirstOtherButtonBlock = ^BOOL(UIAlertView *alertView) {
str = [[alertView textFieldAtIndex:0].text stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];