This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fs = require('fs'); | |
var path = require('path'); | |
fs.mkdirParent = function(dirPath, mode, callback) { | |
//Call the standard fs.mkdir | |
fs.mkdir(dirPath, mode, function(error) { | |
//When it fail in this way, do the custom steps | |
if (error && error.errno === 34) { | |
//Create all the parents recursively | |
fs.mkdirParent(path.dirname(dirPath), mode, callback); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add ´rel="external"´ to every ecternal link | |
$('a').filter(function() { | |
return this.hostname && this.hostname !== location.hostname; | |
}).attr('rel', 'external'); | |
// Open links in new tab | |
$('a[rel=external]').click(function(event){ | |
event.preventDefault(); | |
window.open($(this).attr('href'), '_blank'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="box"> | |
<div class="box__inner is-vertical-aligned"> | |
VERTICAL ALIGNED | |
</div> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* The first commented line is your dabblet’s title | |
*/ | |
body { | |
background: #fff; | |
min-height: 100%; | |
} | |
.container { | |
display: -webkit-flex; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* CSS3 Border-Radius with Border - Circle Avatars | |
*/ | |
/* General Styles */ | |
body { background: url(http://subtlepatterns.com/patterns/white_texture.png); | |
font: 100 14px sans-serif; | |
color: #444555; text-shadow: 0 2px white; | |
text-align: center; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* The first commented line is your dabblet’s title | |
*/ | |
body { | |
background: #f5f5f5; | |
font-family: Helvetica, Arial; | |
margin: 50px; | |
font-size: 20px; | |
min-height: 100%; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){ | |
var aff = 'macx-21'; // replace 'macx-21' with your Amazon affiliate ID, including the '-20' | |
if (!document.getElementById('ASIN')) { | |
alert('Konnte keine Amazon-Produkt-ID finden'); | |
return; | |
} | |
var asin = document.getElementById('ASIN').value; | |
prompt( | |
'Kurz-URL des Amazon-Produkts:', | |
'http://amazon.de/dp/' + asin + '/?tag=' + aff); |
NewerOlder