Skip to content

Instantly share code, notes, and snippets.

View ErikFontanel's full-sized avatar

Erik Gelderblom ErikFontanel

View GitHub Profile
@ErikFontanel
ErikFontanel / stickyheader.js
Created November 25, 2015 10:10
Very simple auto hiding sticky header
$(document).ready(function() {
var initialOffset = -1;
var headerHeight = $("#global__header").outerHeight();
$(window).scroll(function(event) {
var scrollOffset = $(this).scrollTop();
scrollOffset > initialOffset && scrollOffset > headerHeight ? $("#global__header").addClass("hide-header") : initialOffset > scrollOffset && $("#global__header").removeClass("hide-header"),
initialOffset = scrollOffset
}
)
}
@mixin clearfix {
&:after {
content: "";
display: table;
clear: both;
}
}
@mixin vertical-align {
position: relative;
top: 50%;
@ErikFontanel
ErikFontanel / gist:5004115
Last active December 14, 2015 01:09
Error log of using incremental search in Textmate 2.0.0-alpha.9377 on OS X 10.5.7. Screenshot of Textmate window: http://i.imgur.com/lCAVXK7.png
2/21/13 12:26:42.999 PM TextMate: *** Assertion failure in -[NSAutoresizingMaskLayoutConstraint _setSymbolicConstant:constant:], /SourceCache/AppKit/AppKit-1138.51/Layout.subproj/NSLayoutConstraint.m:596
2/21/13 12:26:42.999 PM TextMate: Constant is not finite! That's illegal. constant:nan
2/21/13 12:26:43.019 PM TextMate: (
0 CoreFoundation 0x00007fff85a4df56 __exceptionPreprocess + 198
1 libobjc.A.dylib 0x00007fff8dda2d5e objc_exception_throw + 43
2 CoreFoundation 0x00007fff85a4dd8a +[NSException raise:format:arguments:] + 106
3 Foundation 0x00007fff822e971f -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 169
4 AppKit 0x00007fff849643b9 -[NSLayoutConstraint _setSymbolicConstant:constant:] + 162
5 AppKit 0x00007fff8495ff67 +[NSAutoresizingMaskLayoutConstraint constraintWithItem:attribute:relatedBy:toItem:attribu
@ErikFontanel
ErikFontanel / gist:4724452
Last active December 12, 2015 05:48
Error log of using incremental search on a new user account. Reproduce: 1. Open file 2. Press Ctrl+S 3. Enter string, press Ctrl+S a few times 4. Press Esc to stop typing 5. Window stops updating, pressing ctrl+s still works, highlights are rendered.
2/6/13 6:49:25.213 PM TextMate: *** Assertion failure in -[NSAutoresizingMaskLayoutConstraint _setSymbolicConstant:constant:], /SourceCache/AppKit/AppKit-1138.51/Layout.subproj/NSLayoutConstraint.m:596
2/6/13 6:49:25.213 PM TextMate: Constant is not finite! That's illegal. constant:nan
2/6/13 6:49:25.228 PM TextMate: (
0 CoreFoundation 0x00007fff8a6fcf56 __exceptionPreprocess + 198
1 libobjc.A.dylib 0x00007fff92a51d5e objc_exception_throw + 43
2 CoreFoundation 0x00007fff8a6fcd8a +[NSException raise:format:arguments:] + 106
3 Foundation 0x00007fff86f9871f -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 169
4 AppKit 0x00007fff896133b9 -[NSLayoutConstraint _setSymbolicConstant:constant:] + 162
5 AppKit 0x00007fff8960ef67 +[NSAutoresizingMaskLayoutConstraint constraintWithItem:attribute:relatedBy:toItem:attribute:mul