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
| $ = jQuery | |
| $.activeTransforms = 0 | |
| $(document).ajaxSend (e, xhr, settings) -> | |
| return unless settings.warn | |
| $.activeTransforms += 1 | |
| $(document).ajaxComplete (e, xhr, settings) -> | |
| return unless settings.warn |
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
| $ = jQuery | |
| $.fn.lineHeight or= -> | |
| if height = @data('lineHeight') | |
| return height | |
| # Create a hidden div with the same font | |
| # properties, then measure its height | |
| $shadow = $('<span />') | |
| $shadow.css({ |
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
| $ = jQuery | |
| TIMEOUT = 20000 | |
| lastTime = (new Date()).getTime() | |
| setInterval -> | |
| currentTime = (new Date()).getTime() | |
| # If timeout was paused (ignoring small | |
| # variations) then trigger the 'wake' event | |
| if currentTime > (lastTime + TIMEOUT + 2000) |
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
| $ = jQuery | |
| $.support.touch or= ('ontouchstart' of window) | |
| # Helper functions | |
| parentIfText = (node) -> | |
| if 'tagName' of node then node else node.parentNode | |
| swipeDirection = (x1, x2, y1, y2) -> | |
| xDelta = Math.abs(x1 - x2) |
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
| /*! | |
| * | |
| * Copyright (c) David Bushell | @dbushell | http://dbushell.com/ | |
| * | |
| */ | |
| var fs = require("fs"), | |
| path = require("path"); | |
| module.exports = function(grunt) |
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
| class Color | |
| @regex: /(?:#([0-9a-f]{3,6})|rgba?\(([^)]+)\))/i | |
| @fromHex: (hex) -> | |
| if hex[0] is '#' | |
| hex = hex.substring(1, 7) | |
| if hex.length is 3 | |
| hex = hex.charAt(0) + hex.charAt(0) + | |
| hex.charAt(1) + hex.charAt(1) + |
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
| /* ----------------------------------------------------------------------- */ | |
| /* */ | |
| /* Improved upon a mixin from 37signals and combined */ | |
| /* with these numbers from marc. */ | |
| /* */ | |
| /* 37signals-version: */ | |
| /* http://37signals.com/svn/posts/3271-easy-retina-ready-images-using-scss */ | |
| /* */ | |
| /* @kimroen */ | |
| /* */ |
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
| (function($){ | |
| function dragEnter(e) { | |
| $(e.target).addClass("dragOver"); | |
| e.stopPropagation(); | |
| e.preventDefault(); | |
| return false; | |
| }; | |
| function dragOver(e) { | |
| e.originalEvent.dataTransfer.dropEffect = "copy"; |
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
| <!DOCTYPE html> | |
| <!-- Helpful things to keep in your <head/> | |
| // Brian Blakely, 360i | |
| // http://twitter.com/brianblakely/ | |
| --> | |
| <head> | |
| <!-- Disable automatic DNS prefetching. | |
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
| #!/bin/bash | |
| # | |
| # DESCRIPTION: | |
| # | |
| # Set the bash prompt according to: | |
| # * the branch/status of the current git repository | |
| # * the branch of the current subversion repository | |
| # * the return value of the previous command | |
| # | |
| # USAGE: |
NewerOlder