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
#!/usr/bin/env bash | |
NAMESPACE=$1 | |
STATEFULSET=$2 | |
CONTAINER=$3 | |
COMMAND=$4 | |
GREP=$5 | |
REPLICAS=$(kubectl -n $NAMESPACE get statefulset $STATEFULSET -o=jsonpath='{.status.currentReplicas}') |
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
import jenkins.* | |
import jenkins.model.* | |
import hudson.* | |
import hudson.model.* | |
MAX_BUILDS = 20 | |
for (organization in Jenkins.instance.items) { | |
for (project in organization.items) { | |
int count = 0 |
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
import collections | |
def merge_dict(d1, d2): | |
for k,v2 in d2.items(): | |
v1 = d1.get(k) # returns None if v1 has no value for this key | |
if ( isinstance(v1, collections.Mapping) and | |
isinstance(v2, collections.Mapping) ): | |
merge_dict(v1, v2) | |
else: | |
d1[k] = v2 |
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
package com.photo.gallery; | |
import java.awt.AlphaComposite; | |
import java.awt.Graphics2D; | |
import java.awt.Image; | |
import java.awt.image.BufferedImage; | |
import java.io.File; | |
import javax.imageio.ImageIO; | |
import javax.servlet.http.HttpServlet; |
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 class="nojs"> | |
<head> | |
<title>My Title</title> | |
<script>document.documentElement.className = "js";</script> | |
<link rel="stylesheet" href="style.css"> | |
</head> | |
<body> | |
<p> | |
<a class="myclass">My Link</a> |
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
$(function() { | |
$("form input").keypress(function (e) { | |
if ((e.which && e.which == 13) || (e.keyCode && e.keyCode == 13)) { | |
$('button[type=submit] .default').click(); | |
return false; | |
} else { | |
return 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
<rule> | |
<from>^/tidy/page$</from> | |
<to>/old/url/scheme/page.do</to> | |
</rule> | |
<outbound-rule> | |
<from>^/old/url/scheme/page.do$</from> | |
<to>/tidy/page</to> | |
</outbound-rule> |
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
package com.greatwebguy.filter; | |
import java.io.IOException; | |
import javax.servlet.Filter; | |
import javax.servlet.FilterChain; | |
import javax.servlet.FilterConfig; | |
import javax.servlet.ServletException; | |
import javax.servlet.ServletRequest; | |
import javax.servlet.ServletResponse; | |
import javax.servlet.http.HttpServletRequest; |
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
$(function(){ | |
var tabindex = 1; | |
$('input,select').each(function() { | |
if (this.type != "hidden") { | |
var $input = $(this); | |
$input.attr("tabindex", tabindex); | |
tabindex++; | |
} | |
}); | |
}); |
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
$('form').submit(function(){ | |
$(':submit', this).click(function() { | |
return false; | |
}); | |
}); |
NewerOlder