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 python | |
""" | |
A script to query the Amazon Web Services usage reports programmatically. | |
Ideally this wouldn't exist, and Amazon would provide an API we can use | |
instead, but hey - that's life. | |
Basically takes your AWS account username and password, logs into the | |
website as you, and grabs the data out. Always gets the 'All Usage Types' |
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
To generate | |
<RasterSymbolizer> | |
<RasterColorizer default-mode="linear" default-color="white" epsilon="0.001"> | |
<stop color="blue" value = "-1000" /> | |
<stop color="red" value = "-500" mode = "discrete" /> | |
<stop color="yellow" value = "0" /> | |
<stop value = "5" /> | |
<stop color="red" value = "10" /> | |
<stop color="green" value = "15" /> |
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 python | |
""" | |
Synchronise block devices over the network | |
Copyright 2006-2008 Justin Azoff <[email protected]> | |
Copyright 2011 Robert Coup <[email protected]> | |
License: GPL | |
Getting started: | |
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
--- swig/python/scripts/gdal_retile.py 2011-11-30 14:28:34.528230721 +1300 | |
+++ swig/python/scripts/gdal_retile.py 2011-12-02 14:25:54.106882681 +1300 | |
@@ -44,6 +44,32 @@ | |
import os | |
import math | |
+from Queue import Queue | |
+ | |
+class DummyPool(object): | |
+ def __init__(self, *args, **kwargs): |
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
--- orig/nagircbot-0.0.33/anna.cpp 2011-01-18 23:39:10.000000000 +1300 | |
+++ anna.cpp 2012-04-16 10:49:13.080360702 +1200 | |
@@ -50,6 +50,7 @@ | |
char *nick = "nagircbot"; | |
char *user = "nagircbot"; | |
char *password = NULL; | |
+char *nickserv_password = NULL; | |
int one_line = 1; | |
char *username = "Nagios IRC Bot " VERSION ", (C) www.vanheusden.com"; /* complete username */ | |
int verbose = 255; /* default is log everything */ |
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
' Usage: strip-utf8-bom.vbs file.csv | |
' Notes: | |
' this isn't suitable for large files unless you have a lot of memory - ADODB.Stream reads the entire file into | |
' memory, then builds the output buffer in memory as well. #stupid | |
If WScript.Arguments.Count <> 1 Then | |
WScript.Echo "Usage: strip-utf8-bom.vbs file.csv" | |
WScript.Quit | |
End If |
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
#!/bin/bash | |
USAGE="Runs GDAL nearblack utility over files in a directory tree in parallel. | |
Usage: $0 SOURCE/ DEST/ [nearblack options] | |
Recommended/default nearblack options: | |
-setalpha -white -nb 0 -near 0 -of GTiff -co COMPRESS=DEFLATE -co TILED=YES | |
See more details on nearblack at: http://www.gdal.org/nearblack.html |
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
# On EC2, /mnt is usually already on | |
mounted=$(mount | grep /mnt | wc -l) | |
if [ $mounted -eq 1 ]; then | |
umount -l /mnt | |
fi | |
# Install mdadm and xfsprogs unattended | |
DEBIAN_FRONTEND=noninteractive apt-get -y install mdadm xfsprogs | |
# Create a RAID0 volume with 256KiB stripes, ignore what's already on the device |
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 python | |
""" | |
Loggly CLI interface - standalone (Just Python). Deals with paging results automatically so you can easily grab >2000 rows. | |
Run `loggly.py --help` to see usage information. | |
TODO: | |
* Support XML format results (ie. combining multiple pages of results together) | |
* Facet support |
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
<esri:DataElement xsi:type='esri:DEFeatureDataset' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xs='http://www.w3.org/2001/XMLSchema' xmlns:esri='http://www.esri.com/schemas/ArcGIS/10.1'> | |
<CatalogPath>\test1</CatalogPath> | |
<Name>test1</Name> | |
<ChildrenExpanded>false</ChildrenExpanded> | |
<DatasetType>esriDTFeatureDataset</DatasetType> | |
<Versioned>false</Versioned> | |
<CanVersion>false</CanVersion> | |
<Extent xsi:nil="true"/> | |
<SpatialReference xsi:type='esri:ProjectedCoordinateSystem'> | |
<WKT>PROJCS["WGS_1984_UTM_Zone_20N",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",-63.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0],AUTHORITY["EPSG",32620]]</WKT> |
OlderNewer