Skip to content

Instantly share code, notes, and snippets.

View rob-bar's full-sized avatar

Robbie Bardijn rob-bar

View GitHub Profile
@rob-bar
rob-bar / drupal webform
Last active August 29, 2015 14:02
Webform in it's glory
<div><div id="webform-component-naam-above" class="form-item webform-component webform-component-textfield">
<label for="edit-submitted-naam-above">Naam (above) <span title="Dit veld is verplicht." class="form-required">*</span></label>
<input type="text" class="form-text required" maxlength="128" size="60" value="mijn naam" name="submitted[naam_above]" id="edit-submitted-naam-above">
<div class="description">Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.</div>
</div>
<div id="webform-component-e-mail-above" class="form-item webform-component webform-component-email">
<label for="edit-submitted-e-mail-above">E-mail (above) </label>
<input type="email" size="60" name="submitted[e_mail_above]" id="edit-submitted-e-mail-above" class="email form-text form-email">
<div class="description">Maecenas sed diam eget risus varius blandit sit amet non magna.</div>
</div>
@rob-bar
rob-bar / modernizr.js
Created April 16, 2014 09:47
modernizr
/* Modernizr 2.7.1 (Custom Build) | MIT & BSD
* Build: http://modernizr.com/download/#-fontface-backgroundsize-borderimage-borderradius-boxshadow-flexbox-hsla-multiplebgs-opacity-rgba-textshadow-cssanimations-csscolumns-generatedcontent-cssgradients-cssreflections-csstransforms-csstransforms3d-csstransitions-applicationcache-canvas-canvastext-draganddrop-hashchange-history-audio-video-indexeddb-input-inputtypes-localstorage-postmessage-sessionstorage-websockets-websqldatabase-webworkers-geolocation-inlinesvg-smil-svg-svgclippaths-touch-webgl-shiv-cssclasses-addtest-prefixed-teststyles-testprop-testallprops-hasevent-prefixes-domprefixes-load
*/
;
window.Modernizr = (function( window, document, undefined ) {
var version = '2.7.1',
@rob-bar
rob-bar / equalheight.js
Created April 9, 2014 15:29
equal heights
var helper = {
highest: function(selector) {
return Math.max.apply(this || window, selector.map(function() {
return $(this).innerHeight();
}));
},
equalheights: function(selector, highest) {
return selector.each(function() {
return $(this).css("height", "" + highest + "px");
});
@rob-bar
rob-bar / wysiwyg
Last active August 29, 2015 13:58
basic wysiwyg content for drupal
<h2 style="text-align: left;" dir="rtl">Header 2</h2>
<h3 style="text-align: left;" dir="rtl">Header 3</h3>
<h4>Header 4</h4>
<h5>Header 5</h5>
<h6>Header 6</h6>
<h2 style="text-align: left;" dir="rtl">Header 2</h2>
<p>Test machines hiphoi!&nbsp;Etiam porta sem <u><em><strong>bolditalicunderlined</strong></em></u>&nbsp;magna&nbsp;euismod. <u>Aenean</u> lacinia bibendum<sup>2</sup> nulla<sub>2</sub> sed <a href="node/4">internal link</a>. Etiam porta sem <a target="true" href="http://www.example.org" class="ext">external link</a><span class="ext"></span> magna mollis euismod. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.</p>
<h3 style="text-align: left;" dir="rtl">Header 3</h3>
<p>Test machines hiphoi!&nbsp;Etiam porta sem <u><em><strong>bolditalicunderlined</strong></em></u>&nbsp;magna&nbsp;euismod. <u>Aenean</u> lacinia bibendum<sup>2</sup> nulla<sub>2</sub> sed <a href="node/4">internal link</a>. Etiam porta sem <a target="true" href="http:
@rob-bar
rob-bar / html5boiler.html
Last active August 29, 2015 13:56
html5boiler
<!DOCTYPE html>
<html>
<body>
<header class="l-header">
<div class="l-header-top l-container">
<a href="/en" title="nngroup" rel="home" class="site-logo">
<img src="http://nngroup.acc.one-agency.be/sites/nngroup/themes/custom/nngroup_omega/logo.png" alt="nngroup">
@rob-bar
rob-bar / Gemfile
Last active January 4, 2016 05:59
front-end gems
source 'https://rubygems.org'
group :development do
gem "sass", "~> 3.3.x"
gem 'sass-globbing'
gem "compass", "~> 1.0.0.alpha.x"
gem "susy", "~> 2.1.1"
gem 'breakpoint', '~> 2.4.2'
gem "ceaser-easing", "~> 0.7"
gem "compass-h5bp", "~> 0.1"
@rob-bar
rob-bar / package.json
Last active January 4, 2016 02:38
Basic Package.json
{
"author": "Robbie Bardijn",
"name": "lololodash",
"version": "0.0.1",
"private": true,
"description": "nodeschool lessons",
"scripts": {
"start": "nodemon app.coffee"
},
@rob-bar
rob-bar / .htaccess
Created January 8, 2014 13:30 — forked from thoop/.htaccess
# Change YOUR_TOKEN to your prerender token and uncomment that line if you want to cache urls and view crawl stats
# Change http://example.com (at the end of the last RewriteRule) to your website url
<IfModule mod_headers.c>
#RequestHeader set X-Prerender-Token "YOUR_TOKEN"
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
@rob-bar
rob-bar / ajax.coffee
Created November 20, 2013 10:34
jquery ajax call #jquery #ajax #coffeescript
$.ajax
url: $form.attr("action")
type: $form.attr("method")
data: $form.serializeArray()
.fail (jqXHR, textStatus, errorThrown) ->
.done (data, textStatus, jqXHR) ->
@rob-bar
rob-bar / base.coffee
Last active December 26, 2015 23:19
base #coffeescript #jquery
helper =
track_event: (category, label, value) ->
try
# console.log "track: category: #{category} - label: #{label} - value: #{value}"
if label? and value?
_gaq.push ['_trackEvent', category, label, value]
else if label?
_gaq.push ['_trackEvent', category, label]
else
_gaq.push ['_trackEvent', category]