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
projects = {'ProjectA' : {'deps' : ['ProjectB']}, | |
'ProjectB' : {'deps' : None}, | |
'ProjectC' : {'deps' : ['ProjectA']}} | |
cont = 0 | |
def deploy(name, desc): | |
""" | |
Detects the order of deploy for projects in a dict. | |
Each dic entry is the name of Projet : {desc}, where desc is a dict containing: |
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
''' | |
@author: markito | |
@version: 1.0 | |
@summary: Script to create necessary JMS queues | |
@todo: SORTED ????? Example: alist = sorted(environments.iteritems(), key=lambda (k,v): (v,k)) | |
@todo: SCP solution to create the files only work for Linux/Unix environments. | |
''' | |
import sys, os, getopt |
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
<xsl:variable name="myYear" select="year-from-date(current-date())"/> | |
<xsl:choose> | |
<xsl:when test="/env:Body/rout:ISO8583_0100/ISO8583_0100_Request/bit_013 = 1231"> | |
<top:transactionDate> | |
<xsl:choose> | |
<xsl:when test="concat(month-from-date(current-date()),day-from-date(current-date())) != 1231"> | |
<xsl:variable name="fixYear" select="int($myYear - 1)"/> | |
<xsl:value-of select="concat(/env:Body/rout:ISO8583_0100/ISO8583_0100_Request/bit_013,$fixYear)"/> | |
</xsl:when> | |
<xsl:otherwise> |
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
<c:when test="#{fn:containsIgnoreCase(request.getHeader('User-Agent'), 'MSIE 6') || | |
fn:containsIgnoreCase(request.getHeader('User-Agent'), 'MSIE 7') || | |
fn:containsIgnoreCase(request.getHeader('User-Agent'), 'MSIE 8') || | |
fn:containsIgnoreCase(request.getHeader('User-Agent'), 'Firefox/3.2')}"> | |
<h:panelGrid columns="1" id="browserCheck"> | |
<h2>#{bundle.BrowserNotSupported} <br /></h2> | |
<strong>Browser Information: </strong>#{request.getHeader('User-Agent')} |
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
PS1="\n\[\e[32;1m\](\[\e[37;1m\]\w\[\e[32;1m\])-(\[\e[37;1m\]\$(/bin/ls -1 | /usr/bin/wc -l | /bin/sed 's: ::g') files\[\e[32;1m\])->\n\[\e[32;1m\](\[\e[37;1m\]\u\[\e[32;1m\]@\[\e[37;1m\]\h\[\e[32;1m\])\$ \[\e[0m\]" |
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 | |
for X in $(egrep -o "[A-Z]\w*Exception" $1 | sort | uniq); | |
do | |
echo -n -e "$X\t" | |
grep -c "$X" $1 | |
done |
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
ObjectMapper mapper = new ObjectMapper(); | |
Map<String, Object> map = mapper.readValue(jsonResponse, Map.class); | |
LinkedHashMap<String, Object> linkedMap = (LinkedHashMap) map.get("body"); | |
LinkedHashMap<String, Object> serverValues = (LinkedHashMap) linkedMap.get("item"); | |
if (serverValues == null) { | |
ArrayList list = (ArrayList) linkedMap.get("items"); |
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/bin/python | |
''' | |
Created on Jun 26, 2012 | |
@author: markito | |
''' | |
import getopt, sys, getpass | |
import urllib2 | |
__version__ = 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
find ~/.m2 -name "*.lastUpdated" -exec grep -q "Could not transfer" {} \; -print -exec rm {} \; |
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 | |
### | |
# Takes live histograms every $2 seconds of $1 process | |
### | |
## set your java home | |
#JAVA_HOME=/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Hom | |
if [[ ! -x "$JAVA_HOME/bin/jmap" ]]; then | |
echo "Script not able to find JAVA_HOME/bin/jmap - Please set JAVA_HOME environment variable" |
OlderNewer