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 java.net.URL | |
import com.vmware.vim25.* | |
import com.vmware.vim25.mo.* | |
/* | |
Example invocation: | |
groovy -cp lib/dom4j-1.6.1.jar:lib/vijava50120120518.jar Sample.groovy 1 2 3 websphere "Network adapter 1" DMZ | |
*/ |
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
snmp_ro_community: xxxxxxx | |
snmp_management_station: 10.0.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
<?xml version="1.0"?> | |
<xsl:stylesheet | |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | |
xmlns:opennms="http://xmlns.opennms.org/xsd/config/poller" | |
version="1.0"> | |
<xsl:template match="opennms:service"> | |
<xsl:if test="contains(@name, 'Windows')"> | |
<xsl:element name="detector"> | |
<xsl:attribute name="class">org.opennms.netmgt.provision.detector.snmp.Win32ServiceDetector</xsl:attribute> |
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 | |
# | |
# Template SUSE system startup script for example service/daemon salt-minion | |
# Copyright (C) 1995--2005 Kurt Garloff, SUSE / Novell Inc. | |
# | |
# This library is free software; you can redistribute it and/or modify it | |
# under the terms of the GNU Lesser General Public License as published by | |
# the Free Software Foundation; either version 2.1 of the License, or (at | |
# your option) any later version. | |
# |
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
/** | |
* Created with JetBrains WebStorm. | |
* User: unicoletti | |
* Date: 8/21/12 | |
* Time: 11:00 AM | |
* To change this template use File | Settings | File Templates. | |
*/ | |
AA={}; |
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/perl -w | |
while ($line = <>) { | |
if ($line =~ m/<a href=\"(.*)\">.*<\/a>/i) { | |
print $1 . "\n"; | |
} | |
} |
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
/* | |
NOTE: replace YourListView/YourController with the actual names of the | |
controller/listview in your app. | |
*/ | |
YourController.content.add(yournewobject); | |
this.invokeLater(function(){ | |
YourListView.computeLayout(); | |
YourListView.scrollDownPage(); |
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 csv | |
from jinja2 import Template,FileSystemLoader,Environment | |
loader = FileSystemLoader('templates') | |
env = Environment(loader=FileSystemLoader('templates')) | |
tmp=[] | |
hostgroups=set() | |
hosts = csv.reader(open('hosts.csv'), delimiter=',', quotechar='"') | |
for h in hosts: |
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
--- style.xml.orig 2012-05-31 15:39:50.080704580 +0200 | |
+++ style.xml 2012-05-31 15:40:36.856701370 +0200 | |
@@ -1,5 +1,5 @@ | |
<?xml version="1.0" encoding="utf-8"?> | |
-<Map srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs +over" bgcolor="rgb(140,182,211)"> | |
+<Map srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs +over" bgcolor="rgb(241,238,232)"> | |
<Style name="line pattern style 110"> | |
<Rule name="rule 589"> | |
<Filter>(not (([tunnel]='true')) and not (([tunnel]='yes')))</Filter> |
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/nodejs | |
# run from jsts directory, the script expects lib to be a subdir of current dir | |
var i = require('./lib/javascript.util.js'); | |
var j = require('./lib/jsts.js'); | |
var geometryFactory = new jsts.geom.GeometryFactory(); | |
var coordinate = new jsts.geom.Coordinate(1,2); | |
var point = geometryFactory.createPoint(coordinate); |