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 sheet = (function() { | |
| // Create the <style> tag | |
| var style = document.createElement('style'); | |
| // Add a media (and/or media query) here if you'd like! | |
| // style.setAttribute('media', 'screen') | |
| // style.setAttribute('media', 'only screen and (max-width : 1024px)') | |
| // WebKit hack :( | |
| style.appendChild(document.createTextNode('')); |
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() { | |
| // Used to resolve the internal `[[Class]]` of values | |
| var toString = Object.prototype.toString; | |
| // Used to resolve the decompiled source of functions | |
| var fnToString = Function.prototype.toString; | |
| // Used to detect host constructors (Safari > 4; really typed array specific) | |
| var reHostCtor = /^\[object .+?Constructor\]$/; |
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 'fileutils' | |
| directory = './files' | |
| new_directory = './new' | |
| files = Dir["#{directory}/*"] | |
| Dir.mkdir(new_directory) if !Dir.exists?(new_directory) | |
| files.each do |file| | |
| file_name = File.basename(file) | |
| directory_name = File.basename(file_name, File.extname(file_name)) | |
| directory_path = "#{new_directory}/#{directory_name}" |
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
| // | |
| // Regular Expression for URL validation | |
| // | |
| // Author: Diego Perini | |
| // Updated: 2010/12/05 | |
| // License: MIT | |
| // | |
| // Copyright (c) 2010-2013 Diego Perini (http://www.iport.it) | |
| // | |
| // Permission is hereby granted, free of charge, to any person |
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
| define([], function (nb) { | |
| 'use strict'; | |
| var hasAttribute = function(obj, prop) { | |
| if (obj instanceof jQuery) { | |
| if(obj.length > 1) throw "jQuery Array passed in"; | |
| obj = obj[0]; | |
| } | |
| return !!obj.getAttribute(prop); | |
| }; |
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
| // Make it Nasty | |
| function increment (i) { | |
| i ^= (i & ~-~i) | (~i & -~i) | |
| return i | |
| } |
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
| // Array Remove | |
| Array.prototype.remove = function(from, to) { | |
| var rest = this.slice((to || from) + 1 || this.length); | |
| this.length = from < 0 ? this.length + from : from; | |
| return this.push.apply(this, rest); | |
| }; |
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() { | |
| var hidden = "hidden"; | |
| // Standards: | |
| if (hidden in document) { | |
| document.addEventListener("visibilitychange", onchange); | |
| } else if ((hidden = "mozHidden") in document){ | |
| document.addEventListener("mozvisibilitychange", onchange); | |
| } else if ((hidden = "webkitHidden") in document) { | |
| document.addEventListener("webkitvisibilitychange", onchange); |
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 | |
| libs=( "/usr/local/lib/libmacfuse_i32.2.dylib" \ | |
| "/usr/local/lib/libosxfuse_i32.2.dylib" \ | |
| "/usr/local/lib/libosxfuse_i64.2.dylib" \ | |
| "/usr/local/lib/libmacfuse_i64.2.dylib" \ | |
| "/usr/local/lib/libosxfuse_i32.la" \ | |
| "/usr/local/lib/libosxfuse_i64.la" \ | |
| "/usr/local/lib/pkgconfig/osxfuse.pc" ) |
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
| .text-shadow (@string: 0 1px 3px rgba(0, 0, 0, 0.25)) { | |
| text-shadow: @string; | |
| } | |
| .box-shadow (@string) { | |
| -webkit-box-shadow: @string; | |
| -moz-box-shadow: @string; | |
| box-shadow: @string; | |
| } | |
| .drop-shadow (@x: 0, @y: 1px, @blur: 2px, @spread: 0, @alpha: 0.25) { | |
| -webkit-box-shadow: @x @y @blur @spread rgba(0, 0, 0, @alpha); |