Skip to content

Instantly share code, notes, and snippets.

@cfinster
cfinster / gist:fbf6b5b1f5f46be2e72f
Created January 17, 2016 23:14
Changing your site's favicon with Javascript
function change_favicon(img) {
var favicon = document.querySelector('link[rel="shortcut icon"]');
if (!favicon) {
favicon = document.createElement('link');
favicon.setAttribute('rel', 'shortcut icon');
var head = document.querySelector('head');
head.appendChild(favicon);
}
@cfinster
cfinster / Masonry - imagesLoaded progress.markdown
Created January 15, 2016 23:02
Masonry - imagesLoaded progress
@cfinster
cfinster / Masonry - fitWidth.markdown
Last active January 15, 2016 14:58
Masonry - fitWidth
@cfinster
cfinster / Randomized Images Using Flexbox & JavaScript.markdown
Created January 15, 2016 04:27
Randomized Images Using Flexbox & JavaScript
@cfinster
cfinster / Dynamic Height and Width, with Susy!.markdown
Created January 12, 2016 23:46
Dynamic Height and Width, with Susy!
@cfinster
cfinster / Masonry - imagesLoaded progress.markdown
Created January 12, 2016 23:20
Masonry - imagesLoaded progress
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-45381841-1', 'auto');
ga('send', 'pageview');
</script>
@cfinster
cfinster / gist:504340334964f0d5167c
Created October 22, 2015 08:24
Amorette QR-Code
<img src='https://chart.googleapis.com/chart?cht=qr&chl=Live%20in%20your%20world%2C%20play%20in%20ours!&chs=180x180&choe=UTF-8&chld=L|2' alt='qr code'>
<a href='http://www.qrcode-generator.de' border='0' style='cursor:default' rel='nofollow'></a>
@cfinster
cfinster / my.css
Created April 14, 2015 07:30 — forked from anonymous/my.css
background: linear-gradient(62deg, #250c4e, #be4cbf);
background-size: 400% 400%;
-webkit-animation: AnimationName 10s ease infinite;
-moz-animation: AnimationName 10s ease infinite;
-o-animation: AnimationName 10s ease infinite;
animation: AnimationName 10s ease infinite;
@-webkit-keyframes AnimationName {
    0%{background-position:0% 74%}
    50%{background-position:100% 27%}
    100%{background-position:0% 74%}