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() { | |
function kickStartLinkTag() { | |
if (typeof brightcove !== 'undefined') { | |
if (Object.keys(brightcove.experiences).length === 0) { | |
if (typeof AdOps !== 'undefined' && typeof AdOps.fw !== 'undefined') { | |
AdOps.fw.initLinkTag(); | |
} | |
} | |
} | |
} |
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 () { | |
if (typeof brightcove !== "undefined") { | |
if (Object.keys(brightcove.experiences).length !== 0) { | |
return true; | |
} | |
} | |
return 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
#!/usr/local/bin/node | |
var beautify; | |
try { | |
beautify = require("/usr/local/lib/node_modules/js-beautify").js_beautify; | |
} catch(e) { | |
console.error("js-beautify is not found"); | |
process.exit(e.code); | |
} |
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
/** | |
* Import/include an additional script in the document head | |
* @param {string} src the source file | |
* @param {function} callback the callback function | |
*/ | |
function importScript(src, callback) { | |
var script = document.createElement('script'); | |
script.setAttribute('type', 'text/javascript'); | |
script.setAttribute('src', src); |
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
#!/bin/bash | |
WWW_PATH=/srv/www/public | |
DIST_DIR=./dist | |
RELEASE_DIR=$WWW_PATH/$JOB_NAME | |
RELEASE_NAME=$(echo $JOB_NAME | awk '{print tolower($0)}') | |
if [ ! -d "$RELEASE_DIR" ]; then | |
mkdir -p $RELEASE_DIR/testing |
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 Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> | |
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %> | |
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> | |
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> | |
<%@ attribute name="pg" type="org.springframework.data.domain.Page" required="true" rtexprvalue="true" description="The current Page" %> | |
<c:set var="showPages" value="10" /> | |
<%-- No User Settings Below Here --%> |
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
Floor(N) -> ${N-(N%1)} | |
Ceiling(N) -> ${N+(1-(N%1))%1} | |
Round(N) -> ${N+((N%1>0.5)?(1-(N%1))%1:-(N%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
# First add a rule for all local traffic to port 80 to go into pipe 1 | |
# 100 is the rule number which will be used for referencing the rule later | |
sudo ipfw add 100 pipe 1 ip from 127.0.0.1 to 127.0.0.1 dst-port http | |
# To display the rule use | |
# sudo ipfw show 100 | |
# configure the settings of the pipe as you please | |
# 50kbit/s bandwidth | |
sudo ipfw pipe 1 config bw 50Kbit | |
# 200ms lag |
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
<?xml version='1.0' encoding='UTF-8'?> | |
<server xmlns="urn:jboss:domain:1.2"> | |
<extensions> | |
<extension module="org.jboss.as.clustering.infinispan"/> | |
<extension module="org.jboss.as.clustering.jgroups"/> | |
<extension module="org.jboss.as.cmp"/> | |
<extension module="org.jboss.as.configadmin"/> | |
<extension module="org.jboss.as.connector"/> |