Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am barryvdh on github.
  • I am barryvdh (https://keybase.io/barryvdh) on keybase.
  • I have a public key whose fingerprint is AB59 569C F4B9 989D B442 34B3 A67C 9D6F 2EC7 8E42

To claim this, I am signing this object:

@barryvdh
barryvdh / PATCH_SUPEE-389_EE_1.12.0.2_v2.sh
Last active August 29, 2015 14:26 — forked from piotrekkaminski/PATCH_SUPEE-389_EE_1.12.0.2_v2.sh
SUPEE-389: Every time the catalog URL is rendexed, a new custom rewrite is created
#!/bin/bash
# Patch apllying tool template
# v0.1.2
# (c) Copyright 2013. Magento Inc.
#
# DO NOT CHANGE ANY LINE IN THIS FILE.
# 1. Check required system tools
_check_installed_tools() {
local missed=""
@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>
See https://github.com/fruitcakestudio/magerun-modman/blob/master/src/Fruitcake/Magerun/Modman/GenerateCommand.php
Verifying that +barryvdh is my blockchain ID. https://onename.com/barryvdh
@barryvdh
barryvdh / bench.php
Last active February 2, 2016 08:05 — forked from nikic/bench.php
Benchmark of call_user_func_array vs switch optimization vs argument unpacking syntax
<?php error_reporting(E_ALL);
function test() {}
$nIter = 1000000;
$argNums = [0, 1, 2, 3, 4, 5, 100];
$func = 'test';
foreach ($argNums as $argNum) {
@barryvdh
barryvdh / .gitignore
Last active March 15, 2016 18:53 — forked from Ocramius/.gitignore
tests
composer.lock
composer.phar
vendor
@barryvdh
barryvdh / laravel-docs-scraper.php
Created June 9, 2015 19:20
Laravel docs scraper
<?php
// composer require fabpot/goutte
Route::get('docs', function(){
$host = 'http://laravel.com';
$base = '/docs/5.1/';
$client = new Goutte\Client();
$crawler = $client->request('GET', $host.$base);
<!DOCTYPE html>
<html dir="ltr">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>Google Doc viewer</title>
<style type="text/css">
body, html {
margin: 0; padding: 0; height: 100%; overflow: hidden;
}