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 checkUrl = function(url) { | |
var regex = new RegExp("(https?://(?:www.|(?!www))[^s.]+.[^s]{2,}|www.[^s]+.[^s]{2,})"); | |
return url.match(regex) ? !0 : !1 | |
}; |
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
getVideoId = { | |
siteMap : { | |
"youtube" : { | |
r : /(youtu\.be\/|youtube\.com\/(watch\?(.*&)?v=|(embed|v)\/))([^\?&"'>]+)/, | |
id : 5 | |
}, | |
"vimeo" : { | |
r : /https?:\/\/(?:www\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/([^\/]*)\/videos\/|album\/(\d+)\/video\/|)(\d+)(?:$|\/|\?)/, | |
id : 3 | |
}, |
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 { | |
background: #000; | |
} | |
.countdown { | |
background: #000; | |
color: #fff; | |
display: table; | |
margin: 0 auto; | |
text-align: center; | |
font-family: arial; |
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
window.serialize = { | |
simple(form) { | |
const formel = document.querySelectorAll(form); | |
const inputs = formel[0].querySelectorAll("input, select, textarea"); | |
const obj = {}; | |
let key; | |
for (key in inputs) { | |
if (inputs[key].tagName) { | |
if (inputs[key].type === "checkbox") { | |
obj[inputs[key].name] = inputs[key].checked === true ? inputs[key].value : false; |
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
JSON.fix = function(obj) { | |
return obj.replace(/(['"])?([a-zA-Z0-9_]+)(['"])?:/g, '"$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
"use strict"; | |
use(function() { | |
var url = this.api, | |
getRequest = new org.apache.commons.httpclient.methods.GetMethod(url), | |
client = new org.apache.commons.httpclient.HttpClient(), | |
status = new org.apache.commons.httpclient.HttpStatus(), | |
inputStream; | |
console.log("Retrieving data from " + url); | |
try { | |
var statusCode = client.executeMethod(getRequest); |