Skip to content

Instantly share code, notes, and snippets.

@barryvdh
barryvdh / colorbox.less
Created March 10, 2012 18:49
Colorbox skin for Bootstrap
/*
ColorBox Core Style:
The following CSS is consistent between example themes and should not be altered.
*/
#colorbox, #cboxOverlay, #cboxWrapper{position:absolute; top:0; left:0; z-index:10001; overflow:hidden;}
#cboxOverlay{position:fixed; width:100%; height:100%;}
#cboxMiddleLeft, #cboxBottomLeft{clear:left;}
#cboxContent{position:relative;}
#cboxLoadedContent{overflow:auto;}
#cboxTitle{margin:0;}
@barryvdh
barryvdh / gist:2029466
Created March 13, 2012 15:40
Old Bootstrap grid code (mixin.less) for compatibilty with phpLess
// The Grid
#grid {
.core (@gridColumnWidth: @gridColumnWidth , @gridGutterWidth: @gridGutterWidth) {
.span (@columns) {
width: (@gridColumnWidth * @columns) + (@gridGutterWidth * (@columns - 1));
}
@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 {
@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 / 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 / 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 / _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 / carousel.js
Last active March 21, 2024 01:10
Bootstrap Carousel, with jQuery fallback for Internet Explorer (To have sliding images)
@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 / 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();