Skip to content

Instantly share code, notes, and snippets.

View jannisg's full-sized avatar

Jannis Gundermann jannisg

  • Auckland, New Zealand
View GitHub Profile
@jannisg
jannisg / demo.html
Created December 21, 2012 20:51
Illustrates another way of vertically centring icons from a Compass sprite sheet, based on the example by Tracy Rotton on the Treehouse blog: http://blog.teamtreehouse.com/the-ecstasy-and-agony-of-compass-sprite-generation-part-1
<ul>
<li><a href="#"><i class="icon-newspaper"></i> Newspaper</a></li>
<li><a href="#"><i class="icon-comment"></i> Comment</a></li>
<li><a href="#"><i class="icon-telephone"></i> Telephone</a></li>
<li><a href="#"><i class="icon-shoppingcart"></i> Shopping Cart</a></li>
</ul>
@jannisg
jannisg / @keyframes output
Created October 9, 2012 06:02
Output of the SASS keyframes mixing. (For debugging purposes)
@-webkit-keyframes reveal {
0% {
opacity: 0;
-webkit-transform: scale(0, 0) rotateZ(0);
-moz-transform: scale(0, 0) rotateZ(0);
-ms-transform: scale(0, 0) rotateZ(0);
-o-transform: scale(0, 0) rotateZ(0);
transform: scale(0, 0) rotateZ(0);
}
100% {
@jannisg
jannisg / dabblet.css
Created September 17, 2012 09:27
Animation
#clock {
position: relative;
width: 200px;
height: 200px;
border: 5px solid black;
border-radius: 200px;
}
#clock:before {
position: absolute; display: inline-block;
width: 10px;
@jannisg
jannisg / gist:3605930
Created September 3, 2012 00:43
AngularJS: Page Layout Directive
Scst.directive('pageLayout', [function(){
var linkFn;
// set .main height
function mainHeight() {
console.log('setting mainHeight');
var padding = parseInt( $('.main').css('paddingTop'), 10) + parseInt( $('.main').css('paddingBottom'), 10);
console.log($('.site-header') );
console.log("heights: ", $(window).height(), $('.site-header').height(), padding );
$('.main').height( $(window).height() - $('.site-header').height() - padding );
@jannisg
jannisg / gist:2599760
Created May 5, 2012 04:20
MiddleMan 3beta2 Error trace
NoMethodError: undefined method `ordinalize' for 13:Fixnum
/Volumes/Storage2/Sites/git/melbourneit.com.au/source/modules/_feedblock.erb:19:in `block in evaluate_source'
/Volumes/Storage2/Sites/git/melbourneit.com.au/source/modules/_feedblock.erb:15:in `times'
/Volumes/Storage2/Sites/git/melbourneit.com.au/source/modules/_feedblock.erb:15:in `evaluate_source'
/Users/jannis/.rvm/gems/ruby-1.9.2-p290/gems/tilt-1.3.3/lib/tilt/template.rb:209:in `instance_eval'
/Users/jannis/.rvm/gems/ruby-1.9.2-p290/gems/tilt-1.3.3/lib/tilt/template.rb:209:in `evaluate_source'
/Users/jannis/.rvm/gems/ruby-1.9.2-p290/gems/tilt-1.3.3/lib/tilt/template.rb:144:in `cached_evaluate'
/Users/jannis/.rvm/gems/ruby-1.9.2-p290/gems/tilt-1.3.3/lib/tilt/template.rb:127:in `evaluate'
/Users/jannis/.rvm/gems/ruby-1.9.2-p290/gems/tilt-1.3.3/lib/tilt/template.rb:76:in `render'
/Users/jannis/.rvm/gems/ruby-1.9.2-p290/gems/middleman-core-3.0.0.beta.2/lib/middleman-core/core_extensions/rendering.rb:191:in `render_individual_file'
@jannisg
jannisg / Gemfile.lock
Created April 27, 2012 06:08
rack (1.4.1, 1.3.6) mismatch in MiddleMan
GEM
specs:
activesupport (3.2.3)
i18n (~> 0.6)
multi_json (~> 1.0)
addressable (2.2.7)
chunky_png (1.2.5)
coffee-script (2.2.0)
coffee-script-source
execjs
@jannisg
jannisg / gist:2493042
Created April 25, 2012 20:24
Error in MiddleMan 3.0.0.beta.2
SyntaxError at /
/Volumes/Storage2/Sites/git/michael-braid.com/templates/source/partials/_header.erb:4: syntax error, unexpected ')' ...ex.html", :class => 'logo' do ).to_s); @_out_buf.concat "\n" ... ^ /Volumes/Storage2/Sites/git/michael-braid.com/templates/source/partials/_header.erb:38: syntax error, unexpected keyword_ensure, expecting ')' /Volumes/Storage2/Sites/git/michael-braid.com/templates/source/partials/_header.erb:40: syntax error, unexpected keyword_end, expecting ')'
Ruby /Users/jannis/.rvm/gems/ruby-1.9.2-p290/gems/tilt-1.3.3/lib/tilt/template.rb: in instance_eval, line 209
Web GET localhost/
Jump to:
GETPOSTCookiesENV
Traceback (innermost first)
/Users/jannis/.rvm/gems/ruby-1.9.2-p290/gems/tilt-1.3.3/lib/tilt/template.rb: in instance_eval
@jannisg
jannisg / dabblet.css
Created April 24, 2012 22:28 — forked from daneden/dabblet.css
Toast demo - with dividers
/* Toast demo - with dividers */
.grid-4 {
border-right: 1px solid;
padding-right: 1.7%;
vertical-align: top;
}
.grid-4:last-child {
border:none;
}
@jannisg
jannisg / googlemap.style.js
Created May 12, 2011 02:48
B+W Google Map Style
var stylez = [
{
featureType: "water",
elementType: "all",
stylers: [
{ visibility: "simplified" },
{ saturation: -51 },
{ lightness: 22 }
]
},{
<!-- THE LOOP -->
<ul class="videoTop">
{exp:channel:entries
channel="tapes"
disable="categories|category_fields|member_data|trackbacks"
dynamic="no"
status="open"
}
<li>
<div class="videoLarge">