Skip to content

Instantly share code, notes, and snippets.

View bajramemini's full-sized avatar

Bajram Emini bajramemini

View GitHub Profile

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
<?php
use Illuminate\Support\Contracts\ArrayableInterface;
use Illuminate\Support\Contracts\JsonableInterface;
class Excel implements ArrayableInterface, JsonableInterface{
protected $objPHPExcel;
public function __construct($file){
if($file instanceof \SplFileInfo){
$filename = $file->getRealPath();
#!/bin/bash
# Make sure you are up to date
yum -y update && yum -y install wget
# Install EPEL repository
rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
# Get us a clean working directory
mkdir /php
@bajramemini
bajramemini / AuthenticateController.php
Last active September 9, 2015 23:07 — forked from iolson/AuthenticateController.php
SentinelAuthAdapter for using Tymon\JWTAuth with Cartalyst\Sentinel
<?php namespace App\Http\Controllers\Api\V1;
use App\Http\Controllers\Controller;
use App\Http\Requests;
use Illuminate\Http\Request;
use Tymon\JWTAuth\Facades\JWTAuth;
use Tymon\JWTAuth\Exceptions\JWTException;
class AuthenticateController extends Controller
{
@bajramemini
bajramemini / phpversion.sh
Last active August 27, 2017 16:13 — forked from vjandrea/phpversion.sh
Change php cli version in plesk
#!/bin/sh
printf "Switching php to version 7.0 with symlinks.\n"
printf "Press any key to continue...\n"
read CONTINUE
printf "Creating backups..."
# Backup original binaries