Skip to content

Instantly share code, notes, and snippets.

View webdesignberlin's full-sized avatar
:octocat:
...

Michael Raguse webdesignberlin

:octocat:
...
View GitHub Profile
/*
* Mixin for adding vendor prefixes to CSS attributes; useful for the following CSS attributes
*
* - border-radius
* - box-shadow
* - transition
* - background-size
* - box-sizing
* - animate
*
var myNamespace = myNamespace || {};
myNamespace.myFancyModule = (function() {
var self = {},
_ = {};
_.concatString = function(str) {
return 'Hello ' + str;
};
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="robots" content="noodp, noydir" />
<link rel="dns-prefetch" href="//cdnjs.cloudflare.com">
<link rel="canonical" href="http://mysite.com/" />
<link rel="stylesheet" href="http://mysite.com/style.css" type="text/css" />
.profile { position:relative; }
.profile img {
animation: animationFrames linear 4s;
animation-iteration-count: 1;
transform-origin: ;
-webkit-animation: animationFrames linear 4s;
-webkit-animation-iteration-count: 1;
-webkit-transform-origin: ;
-moz-animation: animationFrames linear 4s;
-moz-animation-iteration-count: 1;
html {
box-sizing: border-box;
}
*, *:before, *:after {
box-sizing: inherit;
}
@webdesignberlin
webdesignberlin / .gitconfig
Last active August 29, 2015 14:05
git config --global
[user]
name = Michael Gerstmann
email = [xxx]@seiler-gerstmann.de
[color]
ui = true
[color "branch"]
current = yellow reverse
local = yellow
remote = green
var webdriver = require('selenium-webdriver');
var fs = require('fs');
var driver = new webdriver.Builder().build();
webdriver.WebDriver.prototype.saveScreenshot = function(filename) {
return driver.takeScreenshot().then(function(data) {
fs.writeFile(filename, data.replace(/^data:image\/png;base64,/,''), 'base64', function(err) {
if(err) throw err;
});
@webdesignberlin
webdesignberlin / extend headings.scss
Last active August 29, 2015 14:06
SASS | make heading classes extended from headings
@for $h from 1 to 7 {
.h#{$h} {
@extend h#{$h};
}
}
/*
* Sample Output:
* h1, .h1 {
* color: red;
@webdesignberlin
webdesignberlin / BEM reduce variable.scss
Last active August 29, 2015 14:06
SASS | reduce variable (since Sass v3.4.4)
.block {
@at-root {
:not(#{&}--modifier) &__elem {
foo: bar;
}
}
}
/*
* CSS OUTPUT:
@webdesignberlin
webdesignberlin / jsonx example 01
Last active August 29, 2015 14:06
JSONx-Konvertierungsbeispiel
JSONx conversion example
This topic introduces a JSONx conversion example.
The following example document is a sample of the JSON structure.
...