Skip to content

Instantly share code, notes, and snippets.

@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 / 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 / Preferences.sublime-settings
Last active January 4, 2016 12:49
my sublimetext2 settings
{
"detect_slow_plugins": true,
"draw_white_space": "all",
"ensure_newline_at_eof_on_save": true,
"font_size": 12,
"smart_indent": false,
"ignored_packages":
[
"LaTeX",
"Scala",
@fuddl
fuddl / uncheckall.js
Last active December 17, 2015 15:39
Uncheck all checkboxes with jQuery
jQuery(':radio').removeAttr('checked');
<?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 / color_hex.txt
Created September 30, 2013 09:15
html standard colors
#FFFFFF,
#C0C0C0,
#808080,
#000000,
#FFA500,
#A52A2A,
#800000,
#008000,
#808000,
#000000,

Bass

Cm/G

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

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

@fuddl
fuddl / ✔.svg
Created April 8, 2014 13:34
svg sample file
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@fuddl
fuddl / 🌐.svg
Created September 19, 2014 07:21
a simple globe icon
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@fuddl
fuddl / creative_commons.html
Created October 3, 2014 08:26
creeative commons icons using inline css only
<span title="Creative Commons" style="border: 3px solid black; border-radius: 50%; line-height: 1.5em; width: 1.5em; display: inline-block; text-align: center; font-family: sans-serif; font-weight: bold">cc</span>
<span title="No Derivative Works" style="border: 3px solid black; border-radius: 50%; line-height: 1.5em; width: 1.5em; display: inline-block; text-align: center; font-family: sans-serif; font-weight: bold">=</span>
<span title="Non commercial" style="border: 3px solid black; border-radius: 50%; line-height: 1.5em; width: 1.5em; display: inline-block; text-align: center; font-family: sans-serif; font-weight: bold; position: relative">$&#823;<span style="display: block; height: 100%; width:.2em; background-color: black; position: absolute; top: 0; left: 50%; margin-left:-.1em; transform: rotate(45deg)"></span></span><
<span title="Creative Commons" style="border: 3px solid black; border-radius: 50%; line-height: 1.5em; width: 1.5em; display: inline-block; text-align: center; font-family: sans-serif;