Skip to content

Instantly share code, notes, and snippets.

@barryvdh
barryvdh / .gitignore
Last active March 15, 2016 18:53 — forked from Ocramius/.gitignore
tests
composer.lock
composer.phar
vendor
@barryvdh
barryvdh / _ide_helper.json
Created August 19, 2014 07:49
Laravel 4 IDE Helper in JSON format for https://shiftedit.net/ (created using https://github.com/barryvdh/laravel-ide-helper with `--format=json` option)
{
"php": {
"classes": {
"App": {
"functions": {
"__construct": "($request = null)",
"bindInstallPaths": "($paths)",
"getBootstrapFile": "()",
"startExceptionHandling": "()",
"environment": "()",
@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();
@barryvdh
barryvdh / laravel-security-checker.md
Last active January 8, 2020 19:40
Symfony Security Checker in Laravel

Symfony Security Checker in Laravel

Artisan command for Sensiolabs Security Checker

Require this project in your composer.json file

"sensiolabs/security-checker": "2.x"

Add the following line to app/start/artisan.php:

@barryvdh
barryvdh / carousel.js
Last active March 21, 2024 01:10
Bootstrap Carousel, with jQuery fallback for Internet Explorer (To have sliding images)
@barryvdh
barryvdh / _ide_helper.php
Last active May 6, 2024 07:45
Laravel IDE Helper for Netbeans / PhpStorm / Sublime Text 2 CodeIntel, generated using https://github.com/barryvdh/laravel-ide-helper
<?php
/**
* A helper file for Laravel 5, to provide autocomplete information to your IDE
* Generated for Laravel 5.5.13 on 2017-09-28.
*
* @author Barry vd. Heuvel <barryvdh@gmail.com>
* @see https://github.com/barryvdh/laravel-ide-helper
*/
namespace {
exit("This file should not be included, only analyzed by your IDE");
@barryvdh
barryvdh / laravel4_codeintel_helper.php
Last active June 8, 2020 06:46
Laravel 4 IDE Helper; CodeIntel version, generated using https://github.com/barryvdh/laravel-ide-helper (With the sublime option)
<?php
/**
* An helper file for Laravel 4, to provide autocomplete information to your IDE
* Generated with https://github.com/barryvdh/laravel-ide-helper
*
* @author Barry vd. Heuvel <barryvdh@gmail.com>
*/
// This is now merged with: https://gist.github.com/barryvdh/5227822
// The same format is used for phpStorm, netBeans and Sublime Text Codeintel!
@barryvdh
barryvdh / Example html
Created June 6, 2012 13:11
Sticky Footer (Less)
<div class="wrapper">
<div class="container">
<header>
</header>
<div id="content">
</div>
</div>
<div class="footer-push"></div>
@barryvdh
barryvdh / gist:2867387
Last active October 5, 2015 19:57
responsive custom grid. (Bootstrap)
@import "bootstrap/responsive.less"; //Disable importing variables and mixins, causes to break..
// LANDSCAPE PHONE TO SMALL DESKTOP & PORTRAIT TABLET
// --------------------------------------------------
@media (max-width: 767px) {
.customGrid(auto, 0);
}
// PORTRAIT TABLET TO DEFAULT DESKTOP
// ----------------------------------
@barryvdh
barryvdh / gist:2834636
Last active March 7, 2023 23:38
custom grid
/* ===== Primary Styles =====================================================
Author: Fruitcake Studio (Barry vd. Heuvel)
========================================================================== */
//Generate a custom (semantic) grid
.customGrid(@gridColumnWidth, @gridGutterWidth){
#header, #main {
.row();
}
.block {