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/sh | |
#RUN this script to establish connection SSH Forwarding to HOSTNAME_HERE" | |
port=`netstat -an | grep 65321 | grep LISTEN | tr -s " " | cut -d" " -f 4 | cut -d"." -f 2` | |
if [[ $port -ne 65321 ]] | |
then | |
echo "Please Enter JUMP_SERVER Password:" | |
`ssh -gL 65321:HOSTNAME_HERE:22 0` | |
else | |
echo "HOSTNAME_HERE Redirect is already running on port 65321" | |
fi |
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
if (!window.console) { | |
window.console = {}; | |
window.console.log = function(){}; | |
} |
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
javascript:void function(){ | |
window.setInterval("window.mainFrame.setActionScreenSubmit('displayLog', 'displayLog')", 300000); | |
document.bgColor='green';alert('Do NOT use this (GREEN) window, it will autorefresh and you may lose your changes\n\nPressing OK will automatically open a new window, continue working in that :)'); | |
window.open(window.location) | |
}() |
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 printPage = function(id){ | |
var html="<html><head><title>Print page</title>"; | |
html+="</head><body>" | |
html+= document.getElementById(id).innerHTML; | |
html+="</body></html>"; | |
var printWin = window.open('','','left=0,top=0,width=1,height=1,toolbar=0,scrollbars=0,status =0'); | |
printWin.document.write(html); | |
printWin.document.close(); | |
printWin.focus(); | |
printWin.print(); |
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"?> | |
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:dp="http://www.datapower.com/extensions" xmlns:dpconfig="http://www.datapower.com/param/config" extension-element-prefixes="dp" exclude-result-prefixes="dp dpconfig"> | |
<!-- | |
This param can be set via the DataPower GUI in the console, and it will come as input to the transformation | |
--> | |
<xsl:param name="dpconfig:paramName"/> | |
<dp:param name="dpconfig:paramName"> | |
<display>Param name value</display> | |
<description>Param Name Description can go here</description> | |
</dp:param> |
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
<xs:element name="Something"> | |
<xs:complexType mixed="true"> | |
<xs:sequence> | |
<xs:any processContents="lax" maxOccurs="unbounded"/> | |
</xs:sequence> | |
<xs:anyAttribute processContents="lax"/> | |
</xs:complexType> | |
</xs:element> |
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
keywords = ['hello world','goodbye cruel world']; | |
function replaceKeywords (domNode) { | |
if (domNode.nodeType === Node.ELEMENT_NODE) { // We only want to scan html elements | |
var children = domNode.childNodes; | |
for (var i=0;i<children.length;i++) { | |
var child = children[i]; | |
// Filter out unwanted nodes to speed up processing. | |
// For example, you can ignore 'SCRIPT' nodes etc. | |
if (child.nodeName != 'EM') { |
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"?> | |
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:str="http://exslt.org/strings" xmlns:regexp="http://exslt.org/regular-expressions"> | |
<!-- Look and say sequence in XSLT : http://en.wikipedia.org/wiki/Look-and-say_sequence --> | |
<xsl:template match="/"> | |
<xsl:variable name="start" select="string('1')"/> | |
START: <xsl:value-of select="$start"/> | |
<xsl:call-template name="loop-de-loop"> | |
<xsl:with-param name="str" select="$start"/> | |
<xsl:with-param name="itr" select="number(1)"/> | |
<xsl:with-param name="stopAt" select="number(30)"/> |
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
#include <Servo.h> | |
#define HEAD_SERVO_PIN 13 | |
#define ULTRASONIC_TRIG_PIN 2 | |
#define ULTRASONIC_ECHO_PIN 5 | |
#define ULTRASONIC_POWER_PIN 3 | |
#define OBSTACLE_MIN_DISTANCE 25 //in centimeter | |
#define MOVE_LEFT_PIN 12 //left | |
#define MOVE_RIGHT_PIN 11 //right |
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
//This should have each valid amount that can be selected in the slider | |
var sliderAmountMap = [10000, 20000,30000, 40000, 45000,50000,65000]; | |
$(function() { | |
$( "#slider" ).slider({ | |
value: 4, //array index of onload selected default value on slider, for example, 45000 in same array will be selected as default on load | |
min: 0, //the values will be from 0 to array length-1 | |
max: sliderAmountMap.length-1, //the max length, slider will snap until this point in equal width increments |
OlderNewer