Skip to content

Instantly share code, notes, and snippets.

View bajramemini's full-sized avatar

Bajram Emini bajramemini

View GitHub Profile
@eamexicano
eamexicano / setup.sh
Created April 26, 2012 03:58
Basic setup for jasmine
#!/bin/sh
if [ -n "$1" ]; then
mkdir ./"$1";
mv docs.sh "$1"/docs.sh;
cd "$1"
# Change "jasmine-standalone-1.2.0.rc3.zip" - for the desired version in the next 2 lines.
wget https://github.com/pivotal/jasmine/downloads/jasmine-standalone-1.2.0.zip;
unzip jasmine-standalone-1.2.0.zip;
sh docs.sh "$1"
$EDITOR .
@sineld
sineld / laravel-upload-resize.php
Created September 25, 2012 08:11
Laravel File Upload And Resize
<?php
// Resizer and Image Manipulation
// Based on: http://forums.laravel.com/viewtopic.php?id=2648
public function post_edit_logo($id)
{
$rules = array(
'image' => 'image',
);
@barryvdh
barryvdh / Excel.php
Last active December 4, 2022 23:25
Simple php-excel class to load an Excel file into an array (using Laravel json/array interface, but you don't have to use that). Don't forget to require https://packagist.org/packages/phpoffice/phpexcel or https://packagist.org/packages/codeplex/phpexcel
<?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();
@drsii
drsii / gist:11408272
Created April 29, 2014 18:29
platform-content - feature
You no longer require a database entry to load content. providing a path will run through Cartalyst/interpret and boom, job done.
@content('foo.bar')
@content('foo.bar', 'baz')
@content('foo.bar', 'http://baz.md')
or
@content('foo.bar', 'some/folder/http://baz.md')
@rydurham
rydurham / gist:1fd7ac4154e6a18865fd
Last active September 4, 2019 07:45
Installing Gulp on Homestead
Via http://christoph-rumpel.com/2014/02/how-to-laravel-series-lets-talk-gulp/
$ node -v
v0.10.28
$ npm -v
1.4.24
@hackel
hackel / SentryAuthAdapter.php
Last active June 24, 2021 14:48
SentryAuthAdapter for using Tymon\JWTAuth with Cartalyst\Sentry
<?php namespace MyApp\Providers;
use Exception;
use Cartalyst\Sentry\Sentry;
use Cartalyst\Sentry\Users\UserInterface;
use Tymon\JWTAuth\Providers\Auth\AuthInterface;
class SentryAuthAdapter implements AuthInterface
{
/**
@FrancesCoronel
FrancesCoronel / sampleREADME.md
Last active March 26, 2024 01:21
A sample README for all your GitHub projects.

Repository Title Goes Here

Frances Coronel

INSERT GRAPHIC HERE (include hyperlink in image)

Subtitle or Short Description Goes Here

ideally one sentence >

@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
{
@vjandrea
vjandrea / phpversion.sh
Last active June 19, 2023 20:44
Change php cli version in plesk
#!/bin/sh
printf "Switching php to version 5.6 with symlinks.\n"
printf "Press any key to continue...\n"
read CONTINUE
printf "Creating backups..."
# Backup original binaries
@ganey
ganey / phpversion.sh
Last active October 31, 2019 09:04 — forked from vjandrea/phpversion.sh
Change php cli version in plesk
#!/bin/sh
printf "Switching php to version 7.1 with symlinks.\n"
printf "Press any key to continue...\n"
read CONTINUE
printf "Creating backups..."
# Backup original binaries