This file contains 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 () { | |
'use strict'; | |
var fo = window.fo = window.fo || {}, | |
eventHandler = fo.eventHandler = fo.eventHandler || {}; | |
eventHandler.events = {}; | |
eventHandler.publish = function (event, data) { | |
var events = event.split(' '), | |
key, func; |
This file contains 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
String.prototype.toCapitalize = function() { | |
return this.toLowerCase().replace(/^\.|\s\S/g, function(a) { | |
return a.toUpperCase(); | |
}); | |
}; |
This file contains 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
fileList=" | |
FILE 1 URL | |
FILE 2 URL | |
FILE 3 URL | |
ETC | |
" | |
for fileName in $fileList | |
do | |
echo "$fileName" |
This file contains 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
body #currentMediaQuery { | |
display: none; | |
} | |
@media only screen and max-width 479px { | |
body #currentMediaQuery { | |
font-family: xxs; | |
} | |
} |
This file contains 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' | |
on_stylesheet_saved do |filename| | |
fileContents = File.read filename | |
File.open(filename, 'w+') do |f| | |
mediaQueryObject = {} | |
regexMedia = /@media([^{]*){((?:(?!}\s*}).)*}.*?)}/xoim | |
regexSelector = /\s*([^{]*){(.*?)}/xoim | |
regexSpace = /\n+|\r+/xoim | |
bodyContents = fileContents.gsub(regexMedia,'') | |
mediaQueryArray = fileContents.scan(regexMedia) |
This file contains 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 triggerCallback = CQ.Ext.extend(CQ.Ext.form.TriggerField, { | |
initComponent: function() { | |
triggerCallback.superclass.initComponent.call(this) | |
}, | |
triggerClass: "x-form-search-trigger", | |
onTriggerClick: function() { | |
if(this.callback) { | |
this.callback.call(this); | |
} | |
}, |
This file contains 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
@mixin sprite-background($name) | |
background-repeat: no-repeat | |
background-image: $standardImg | |
background-position: sprite-position($sprites, $name) | |
height: image-height(sprite-file($sprites, $name)) | |
width: image-width(sprite-file($sprites, $name)) | |
@media (-webkit-min-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 3/2), (min-device-pixel-ratio: 1.5) | |
background-image: $retinaImg | |
background-position: 0 round(nth(sprite-position($sprites2x, $name), 2) / 2) | |
height: round(image-height(sprite-file($sprites2x, $name)) / 2) |
This file contains 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 oldBrowser = (reContainsAll([/mozilla\/5.0/i, /android/i, /applewebkit/i], navigator.userAgent) | |
|| reContainsAll([/mozilla\/5.0/i, /iphone os (5|4|3|2|1){1}/i, /applewebkit/i], navigator.userAgent)) | |
&& !reContainsAll([/chrome/i], navigator.userAgent); | |
Backbone.History.prototype._updateHash = function(location, fragment, replace) { | |
var base = location.toString().replace(/(javascript:|#).*$/, '') + '#'; | |
if (replace) { | |
if (oldBrowser) { | |
window.history.replaceState({}, document.title, base + fragment); | |
} else { |
This file contains 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 () { | |
db = {}; | |
db.map = { | |
'jobs': { | |
'create': { | |
'sql': 'CREATE TABLE "jobs" (id unique, json)' | |
}, | |
'insert': { | |
'sql': 'INSERT INTO "jobs" (id, json) VALUES (?,?)' |
This file contains 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 checkUrl = function(url) { | |
var regex = new RegExp("(https?://(?:www.|(?!www))[^s.]+.[^s]{2,}|www.[^s]+.[^s]{2,})"); | |
return url.match(regex) ? !0 : !1 | |
}; |
OlderNewer