Skip to content

Instantly share code, notes, and snippets.

View weiland's full-sized avatar
🍫
🎓 && 💻 #GitHubDropICE

Pascal Weiland weiland

🍫
🎓 && 💻 #GitHubDropICE
View GitHub Profile
@weiland
weiland / dabblet.css
Created April 23, 2012 12:22
Untitled
body {
background: #1a1a1a;
margin: 0;
padding: 0;
}
header {
padding: 12px 6px 12px 10px;
margin: 24px 10px 0 18px ;
width: 100%;
@weiland
weiland / dabblet.css
Created April 23, 2012 14:47
Untitled
body {
background: #1a1a1a;
margin: 0;
padding: 0;
color: #EEE;
}
header {
width: 100%;
}
@weiland
weiland / dabblet.css
Created April 23, 2012 14:50
Untitled
body {
background: #1a1a1a;
margin: 0;
padding: 0;
}
header {
padding: 12px 6px 12px 10px;
margin: 24px 10px 0 18px ;
width: 100%;
@weiland
weiland / dabblet.css
Created May 5, 2012 11:38
Shadows without images like a css3 freak
/**
* Shadows without images like a css3 freak
*/
body {
margin: 0;
padding: 0;
background: #EEE;
color: #222;
font-family: Verdana;
}
@weiland
weiland / dabblet.css
Created May 5, 2012 12:51
Shadows without images like a css3 freak
/**
* Shadows without images like a css3 freak
*/
body {
margin: 0;
padding: 0;
background: #EEE;
color: #222;
font-family: Verdana;
}
@-webkit-keyframes swinging {
from {
-webkit-transform: rotate(-12deg);
}
to {
-webkit-transform: rotate(32deg);
}
}
@-moz-keyframes swinging {
@weiland
weiland / autoImageRotate.php
Last active December 16, 2015 17:09
Fixes the image's rotation automatically.
/**
* Fixes the rotation
* of an image
* (with Imagick)
*/
function autoImageRotate($img) {
if(!$img) {
return false;
@weiland
weiland / git-cookbook.md
Last active June 12, 2022 15:40
Git Cookbook

Git Cookbook

install git

On Mac:

brew install git # homebrew

sudo port install git-core +bash_completion+credential_osxkeychain # Macports

On other *NIX:

@weiland
weiland / Readme.md
Last active August 29, 2015 14:02
Page Size Visualization Bookmarklet

Visualise the size of each element on the page - Bookmarklet

Read more

Original Blog Post about this topic

What it does

On click it toggles the visualize-style

USE IT

just use the javascript code and add it as a bookmark:

@weiland
weiland / CalculateNewSizes.js
Created June 6, 2014 14:45
Calculate the new size of an element w*h with a new width or height.
(function CalculateNewSizes(){
var width, height, nWidth, nHeight, tmp;
tmp = prompt('Current dimensions 123x1234: ').split('x');
width = tmp[0];
height = tmp[1];
tmp = prompt('Set a new value for width. (prefix h for new Height)').replace(/ /g, '');
if(tmp.indexOf('h') !== -1) {
nHeight = tmp.replace(/h/, '');
nWidth = parseInt(width*nHeight/height);
} else {