This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| while (YES) | |
| { | |
| // | |
| // Lock focus and take all the dragged and mouse up events until we | |
| // receive a mouse up. | |
| // | |
| NSEvent *newEvent = [window | |
| nextEventMatchingMask:(NSLeftMouseDraggedMask | NSLeftMouseUpMask)]; | |
| if ([newEvent type] == NSLeftMouseUp) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| self.updateCount = function(count) { | |
| var $todoCount = $('#todo-stats .todo-count'); | |
| if (count === 0) { | |
| $todoCount.html(''); | |
| } else { | |
| var todoStat = '<span class="number">' + count + '</span> '; | |
| if (count > 1) { | |
| todoStat += '<span class="word">items left.</span>'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var test = '' | |
| , beep = '' | |
| , boop = '' | |
| , meep = 'some super long operation goes here and maybe goes off screen' | |
| ; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // iOS Media Queries | |
| // Goal: capture styles for iPhone, iPhone 3G, iPhone 3GS, iPhone 4, iPhone 4S, iPad, and iPad 2 | |
| // | |
| // Author: Tony Schneider (@tonywok) | |
| // Please tell me where I fail. :) | |
| // iPhone v(4,4S) portrait | |
| // test: black text (overwritten by v* portrait) with blue background | |
| @media all and (-webkit-min-device-pixel-ratio: 2) and (orientation: portrait) { | |
| a { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <style> | |
| * { margin: 0; padding: 0; } | |
| body { padding: 20px; } | |
| ul { | |
| width : 200px; | |
| list-style : none; | |
| } | |
| ul li a { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ========================= getStyleProperty by kangax =============================== | |
| // http://perfectionkills.com/feature-testing-css-properties/ | |
| var getStyleProperty = (function(){ | |
| var prefixes = ['Moz', 'Webkit', 'Khtml', 'O', 'Ms']; | |
| var _cache = { }; | |
| function getStyleProperty(propName, element) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env sh | |
| ## | |
| # This is script with usefull tips taken from: | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # | |
| # install it: | |
| # curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'rubygems' | |
| require 'rack/rewrite' | |
| use Rack::Rewrite do | |
| rewrite '/', '/index.html' | |
| end | |
| use Rack::Static, :urls => ['/'], :root => "public" | |
| run Rack::Directory.new('public') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| JQ.Animate = Ember.Mixin.create({ | |
| cssProperties: ['background', 'backgroundAttachment', 'backgroundColor', 'backgroundImage', 'backgroundPosition', | |
| 'backgroundRepeat', 'border', 'borderBottom', 'borderBottomColor', 'borderBottomStyle', 'borderBottomWidth', | |
| 'borderColor', 'borderLeft', 'borderLeftColor', 'borderLeftStyle', 'borderLeftWidth', 'borderRight', 'borderRightColor', | |
| 'borderRightStyle', 'borderRightWidth', 'borderStyle', 'borderTop', 'borderTopColor', 'borderTopStyle', 'borderTopWidth', | |
| 'borderWidth', 'clear', 'clip', 'color', 'cursor', 'display', 'filter', 'font', 'fontFamily', 'fontSize', | |
| 'fontVariant', 'fontWeight', 'height', 'left', 'letterSpacing', 'lineHeight', 'listStyle', 'listStyleImage', | |
| 'listStylePosition', 'listStyleType', 'margin', 'marginBottom', 'marginLeft', 'marginRight', 'marginTop', 'overflow', | |
| 'padding', 'paddingBottom', 'paddingLeft', 'paddingRight', 'paddingTop', 'pageBreakAfter', 'pageBreakBefore', | |
| 'position', 'styleFloat', 'textAlign', 'textDecoration' |