This file contains 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); |
This file contains 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 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 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 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 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 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 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
// ---- | |
// Sass (v3.3.7) | |
// Compass (v1.0.0.alpha.18) | |
// ---- | |
$sun-index-colors: ( | |
'10' #FCC24E, | |
'15' #F7A722, | |
'20' #F7A722, | |
'30' #D95716, |
This file contains 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
# Connect to LAMP Server using a id_rsa | |
ssh -i ~/Projects/path-to/id_rsa username@servername | |
sudo bash # Set the correct user rights for this session | |
cd /var/www/ # Change directory to the parent of Doc Root | |
chown -R username html # Assign Doc Root to the user `username` | |
chgrp wheel html # Set Apache Group to the `html` Folder | |
# Apache im Bedarfsfall neu starten | |
sudo service httpd restart |
This file contains 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
/** | |
* Base 36 convert Google Worksheet Id (wid) | |
* to Google Spreadsheet ID (gid) | |
* | |
* @param string wid [example: `od6` is equal sheet `0`] | |
* @return string [gid] | |
*/ | |
function wid2gid(wid) { | |
return parseInt(String(wid), 36)^31578; | |
} |
OlderNewer