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
YUI().use('node', 'array-extras', 'querystring-stringify', function (Y) { | |
var form = Y.one('FORM_SELECTOR'), query; | |
query = Y.QueryString.stringify(Y.Array.reduce(Y.one(form).all('input[name],select[name],textarea[name]')._nodes, {}, function (init, el, index, array) { | |
init[el.name] = el.value; | |
return init; | |
})); | |
console.log(query); | |
}); |
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
YUI.add('date-ago', function (Y) { | |
function round(value) { | |
return Math.round(value); | |
} | |
function distanceOfTimeInWords(from_time, to_time, include_s) { | |
var include_seconds, distance_in_minutes, distance_in_seconds; | |
include_seconds = include_s || false; | |
distance_in_minutes = round(Math.abs(to_time - from_time) / 60000); |
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> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Loader Test</title> | |
<meta name="generator" content="TextMate http://macromates.com/"> | |
<meta name="author" content="Ryan Cannon"> | |
<script src="http://www.nfl.com/yui/3.4.1/build/yui/yui-min.js"></script> | |
<script> | |
var YUI_config = { |
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
YUI.add('handlebars-helpers', function(Y) { | |
var NS = Y.namespace('TDP'), | |
Handlebars = Y.Handlebars, | |
Lang = Y.Lang, | |
isString = Lang.isString, | |
isArray = Lang.isArray, | |
isObject = Lang.isObject, | |
isFunction = Lang.isFunction, | |
Aeach = Y.Array.each, |
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
YUI.applyConfig({ | |
groups: { | |
gallery: { | |
combine: false, | |
root: '/build/', | |
patterns: { | |
'gallery-': { }, | |
'lang/gallery-': {}, | |
'gallerycss-': { type: '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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>SWF & JavaScript Key Event</title> | |
<style> | |
#focusable-link { | |
position: absolute; | |
left: -1000em; | |
top: -1000em; | |
} |
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
// This is the official Selenium documention endorsed method of waiting for elements. | |
// This method is ineffective because it still suffers from | |
// the stale element exception. | |
public static void clickByLocator ( final By locator ) { | |
WebElement myDynamicElement = ( new WebDriverWait(driver, 10)) | |
.until( ExpectedConditions.presenceOfElementLocated( locator ) ); | |
myDynamicElement.click(); | |
} |
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
docker rmi $(docker images -q -f dangling=true) |
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
node { | |
echo 'Results included as an inline comment exactly how they are returned as of Jenkins 2.121, with $BUILD_NUMBER = 1' | |
echo 'No quotes, pipeline command in single quotes' | |
sh 'echo $BUILD_NUMBER' // 1 | |
echo 'Double quotes are silently dropped' | |
sh 'echo "$BUILD_NUMBER"' // 1 | |
echo 'Even escaped with a single backslash they are dropped' | |
sh 'echo \"$BUILD_NUMBER\"' // 1 | |
echo 'Using two backslashes, the quotes are preserved' | |
sh 'echo \\"$BUILD_NUMBER\\"' // "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
wget -c --no-cookies --no-check-certificate --header "Cookie: oraclelicense=accept-securebackup-cookie" https://download.oracle.com/otn-pub/java/jdk/12.0.2+10/e482c34c86bd4bf8b56c0b35558996b9/jdk-12.0.2_linux-x64_bin.tar.gz |
OlderNewer