Skip to content

Instantly share code, notes, and snippets.

@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);
@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}): ?>
# 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 / 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 += ' ';
- }
@fuddl
fuddl / constellations.yml
Created December 6, 2017 19:42
Stellar constellations in yaml
constellations:
ursa minor:
name: 'Ursa Minor'
stars:
- - 424
- 6789
- 6322
- 5903
- 6116
- 5735
@fuddl
fuddl / spacedock.scad
Last active February 10, 2022 18:01
Earth Spacedock
cylinder(h = 3, r=40);
translate([0,0,13])
cylinder(h=45, r=43);
translate([0,0,3])
cylinder(h=10, r1=38, r2=43);
translate([0,0,58])
union() {
translate([0,0,-113])
@fuddl
fuddl / flower-box.scad
Created January 19, 2019 09:53
Flower box
wall_thickness = 15;
base_thickness = 15;
depth = 260;
width = 870;
height = 200;
echo(str("<b>1x Base: ", width, "x", depth-(wall_thickness*2), "x", base_thickness, " mm</b>"));
translate([0,wall_thickness,0])
@fuddl
fuddl / wikia-data.user.js
Last active March 27, 2020 21:41
Userscript Wikia → Wikidata
// ==UserScript==
// @name WikiaData
// @namespace https://gist.github.com/fuddl
// @version 1.0.7
// @description Enrich Wikia with wikidata ids. Enrich wikidata with wikia ids.
// @updateURL https://gist.githubusercontent.com/fuddl/3fab12d74b52bb9b150d89ead0ac114c/raw/wikia-data.user.js
// @downloadURL https://gist.githubusercontent.com/fuddl/3fab12d74b52bb9b150d89ead0ac114c/raw/wikia-data.user.js
// @author fuddl
// @match https://*.fandom.com/*
// @grant GM_xmlhttpRequest
@fuddl
fuddl / pancakes.md
Last active August 29, 2020 13:43
Pancakes recipe

Ingredients

For approximatly 4 large Pancakes:

Amount Dev Ingreditent
Egg
50g Sugar
200g All purpose flour
150ml ±15ml Water
@fuddl
fuddl / duckduckgo-url-filter.txt
Created February 7, 2021 12:06
Hide certain domains in duckduckgo search results
duckduckgo.com##[data-domain="www.pinterest.com"]
duckduckgo.com##[data-domain="www.w3schools.com"]