Skip to content

Instantly share code, notes, and snippets.

View TorbenL's full-sized avatar

Torben Leuschner TorbenL

View GitHub Profile
@TorbenL
TorbenL / google-plus-comments.phtml
Last active December 16, 2015 10:19
google+ comments
// static integration (replace [URL])
<iframe width="800" height="600" src="https://plusone.google.com/_/widget/render/comments?bsv&href=[URL]&first_party_property=BLOGGER&view_type=FILTERED_POSTMOD&width=750&hl=de">
// wordpress integration
<iframe width="800" height="600" src="https://plusone.google.com/_/widget/render/comments?bsv&href=<?php echo urlencode(get_permalink()); ?>&first_party_property=BLOGGER&view_type=FILTERED_POSTMOD&width=750&hl=de">
// fokus cms integration
<iframe width="800" height="600" src="https://plusone.google.com/_/widget/render/comments?bsv&href=<?php echo urlencode($fks->getURL()); ?>&first_party_property=BLOGGER&view_type=FILTERED_POSTMOD&width=750&hl=de">
@TorbenL
TorbenL / analytics-scroll.html
Created June 14, 2013 06:40
tracking scroll behaviour on single page web design with google analytics
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Single Page Analytics</title>
<script>
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XXXXXXX-XX']);
_gaq.push(['_trackPageview']);
@TorbenL
TorbenL / track-ajax-form.js
Created June 14, 2013 07:33
tracking conversion of ajax form with google analytics
$(function(){
$("form").on("submit", function(e){
e.preventDefault();
$.post('ajax.php', {
data: $("form").serialize()
}, function(result) {
if(!result.ok)
return false;
[fb-post href="https://www.facebook.com/torbenleuschner.de/posts/568421526533431"]
.transition-all {
-webkit-transition: all 0.5s ease-in-out;
-moz-transition: all 0.5s ease-in-out;
-o-transition: all 0.5s ease-in-out;
transition: all 0.5s ease-in-out;
}
<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
<div class="g-post" data-href="https://plus.google.com/114421677831789165567/posts/5SLVJraiZ4P"></div>
[gp-post href="https://plus.google.com/114421677831789165567/posts/5SLVJraiZ4P"]
@TorbenL
TorbenL / class.my-class.php
Created January 7, 2014 16:16
super simple php view class :-)
<?php
class MyClass extends TlView
{
public function __construct()
{
// optional
$this->setViewPath('/');
// optional
$this->setViewFilename('standard-template');
@TorbenL
TorbenL / mixins.scss
Created June 2, 2014 09:03
standard sass mixins
@mixin bp($width) {
@media screen and (max-width: $width){
@content;
}
}
@mixin bpmin($width) {
@media screen and (min-width: $width){
@content;
}
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAADICAMAAAAnUXUoAAAANlBMVEUZGRn///8ZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRkZGRn7pC7QAAAAEXRSTlMAABAgMEBQYHB/j5+vv8/f79hldlkAABjFSURBVHja7Z3bgqQqDEU5KCpilPz/z54HbgHRqurbdM3s/TJTtmCALAVEov6DIOhSClUAQQAEggAIBAEQCAIgEARAIAiAQBAAgSAAAkEABIIgAAJBAASCAAgEARAIAiAQBEAgCIBAEACBIAACQQAEgiAAAkEABIIACAQBEAgCIBAEQCAIgEAQAIEgAAJBEACBIAACQQAEggAIBAEQCAIgEARAIAiAQBAAgSAAAkEQAIEgAAJBAASCAAgEARAIAiAQBEAgCIBAEACBIAiAQBAAgSAAAkEABIIACAS9NSDqbTUYo2/+rO///Oalez3BUxlqY4avLMUXZ9ex8ccA0Y7WH2j3iWh8UP4nDVmZ2bz+57MB31nyD+f9oHSvJ3gqw4mZ7Rc29tdm1830xwBZ7irQ7F9VUs9Mp4OjvLn1DBk6dyK6b/Hmz9qY8cKA25LXtglnY97dYw/u5T0+cyunVwF5lOCpDO3XevSns8utdp3pjwFyW4FfVnGGO4Bs1aU7hiy9y78EyJiu2zHgNqOt90fiqPkDbrs95foARLbaPw4IPQLEfhoQ81FA6BaQhy7XSU4A5FPe8qcAccw8fHvFDczs7tuuY8gXAtIx4Lbkl4DsO/eaTz3MG4C8JyADHfMPVNziN33fdh1DvhCQjgG3Jb8ExCjHd2Rd5g1A3hOQn6y4V9vuKwH5CtvCQfPUKOSDrg9AAMi7A6L4Q7UCQN4JkHlnZhqVUqMjGpUaV2Jm9k53jDLuYGY+rFILEa1KGSJa1Lx5ZuZ9UkqpWWQwOM/srVJq3pj5GNRCtCoVUxxWK2XJM/OeX09EQ7Td47UmOp