Skip to content

Instantly share code, notes, and snippets.

neodigm / zurb_foundation_equalizer_alternative.js
Created May 2, 2017
Lightweight Zurb Foundation Equalizer alternative
View zurb_foundation_equalizer_alternative.js
// Lightweight ZF Equalizer alternative
// Will make two or more HTML elements the same height
// Usage: eq2.makeEqual("[data-equalizer-watch='your_pattern']");
var eq2 = {
Mx: 0,
makeEqual: function( data_eqlzr_watch ){
$( data_eqlzr_watch ).each(function(){
eq2.Mx = ( this.clientHeight > eq2.Mx ) ? this.clientHeight : eq2.Mx;
$( data_eqlzr_watch ).css("height", eq2.Mx + "px");
v-jacob / Mailhog Bash Script (systemd)
Last active Mar 11, 2020
Mailhog setup with systemd
View Mailhog Bash Script (systemd)
#!/usr/bin/env bash
echo ">>> Installing Mailhog"
# Download binary from github
wget --quiet -O ~/mailhog
# Make it executable
chmod +x ~/mailhog
Glurt / gist:ea11b690ba4b1278e049
Created May 4, 2015
Example of the various YouTube url formats
View gist:ea11b690ba4b1278e049
View Mailhog Bash Script (upstart)
#!/usr/bin/env bash
echo ">>> Installing Mailhog"
# Download binary from github
wget --quiet -O ~/mailhog
# Make it executable
chmod +x ~/mailhog
erfanimani / .gitignore
Last active Jun 1, 2019
A refactored and modern .gitignore for Magento. Compatible for Git versions 2.7.0+. See this revision to use it for versions lower than 2.7.0:
View .gitignore
# Ignore everything in media, except for the htaccess files
# Also include the Lazy Catalog Images (LCI) .htaccess if that's installed
# (
ChrisTM / block-grid.less
Last active Jul 1, 2021
Foundation 5's block grids for Bootstrap 3.
View block-grid.less
// # Block Grid
// Technique adapted from Foundation 5 for Bootstrap 3.0.3 to at least 3.3.1.
// # Example Usage
// To produce a grid of 2 items per row on an extra-small screen, and 3 items
// per row on a small screen:
hoylen /
Last active Jul 23, 2020
Portable getopt argument processing in shell scripts. Detects which version of getopt is installed. When available, it uses GNU enhanced getopt to support long option names and whitespaces in arguments. Otherwise, defaults to using the original getopt.
# Example showing use of getopt detection and use of GNU enhanced getopt
# to handle arguments containing whitespace.
# Written in 2004 by Hoylen Sue <>
# To the extent possible under law, the author(s) have dedicated all copyright and
# related and neighboring rights to this software to the public domain worldwide.
# This software is distributed without any warranty.
juice49 /
Created Nov 30, 2012
Using the Laravel Validator, make a field required if another field is set to a given attribute.


  • Add this file to application/libraries (or, if you are already extending the Validator class, add the contents there).
  • Remove Validator alias from config/application.php in order to avoid conflicts.
  • Add "required_if_attribute" => "The :attribute field is required." to application/language/[language]/validation.php.


Define the rule using: