Skip to content

Instantly share code, notes, and snippets.

Bass

Cm/G

e |-------------
H |-------------
G |---0---0-----
D |---1---1-----

A |-3-----------

@fuddl
fuddl / color_hex.txt
Created September 30, 2013 09:15
html standard colors
#FFFFFF,
#C0C0C0,
#808080,
#000000,
#FFA500,
#A52A2A,
#800000,
#008000,
#808000,
#000000,
<?php
function nth_child_4n_ds_field_theme_functions_info() {
return array('theme_ds_field_nth_child_4' => t('Highlight 4th child'));
}
function theme_ds_field_nth_child_4($variables) {
$output = '';
// Render the items.
@fuddl
fuddl / uncheckall.js
Last active December 17, 2015 15:39
Uncheck all checkboxes with jQuery
jQuery(':radio').removeAttr('checked');
@fuddl
fuddl / hex.css
Created December 3, 2012 21:31
Displays html tables as hex matrix
table {
display: block;
}
tr {
display:block;
margin-bottom: -20px;
border-collapse: collapse;
}
@fuddl
fuddl / normal-rand.js
Last active October 13, 2015 08:47
Gaussian normal distribution
/**
* Generate a random number considering gaussian normal distribution.
*
* @param min
* The minimal value. Can be negative or positive.
*
* @param max
* The maximal value. Should be higher then min.
*
* @param dis
@fuddl
fuddl / lipsim.jade
Created March 11, 2015 13:09
deterministic lipsum mixin in jade. Does not create any 'random' text
- var loremCount = 0;
mixin lipsum(amount)
- var loremText = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.";
- var lipsumArray = loremText.split(' ');
- var loremIpsum = '';
- var wordCount = lipsumArray.length
- for (var i = 0; i < amount; i++) {
- if(i > 0) {
- loremIpsum += ' ';
- }
# German translation of Drupal including common anglicisms.
msgid ""
msgstr ""
"Project-Id-Version: Drupal core (7.34)\n"
"POT-Creation-Date: 2014-01-25 08:37+0000\n"
"PO-Revision-Date: YYYY-mm-DD HH:MM+ZZZZ\n"
"Language-Team: German\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
@fuddl
fuddl / _php_mixins.jade
Last active August 29, 2015 14:11
jade php mixins
mixin php-foreach(expr)
| <?php foreach(!{expr}): ?>
block
| <?php endforeach; ?>
mixin php-print(expr)
| <?php print !{expr}; ?>
mixin php-if(expr)
| <?php if(!{expr}): ?>
@fuddl
fuddl / youtube-embedd-responsive
Created December 8, 2014 17:03
Youtube iframe responsive
// embedd your youtube iframe using youtube as element class: <iframe class="youtube"…
$(function() {
var windowE = $(window);
windowE.bind('resize', function() {
$('iframe.youtube').each(function() {
var iframe = $(this);
var width = iframe.width();
var height = width * .61;
iframe.height(height);