Skip to content

Instantly share code, notes, and snippets.

View emxsys's full-sized avatar

Bruce Schubert emxsys

View GitHub Profile
@emxsys
emxsys / curl.md
Created October 21, 2016 19:49 — forked from btoone/curl.md
A curl tutorial using GitHub's API

Introduction

An introduction to curl using GitHub's API

The Basics

Makes a basic GET request to the specifed URI

curl https://api.github.com/users/caspyin
@emxsys
emxsys / build-gdal-2.2.2.sh
Created January 9, 2019 15:34
Build GDAL 2.2.2 with ECW on Ubuntu
#!/bin/bash
# ===============================================================================
# GDAL 2.2.2 build instructions with ECW on Ubuntu
# ===============================================================================
# Downloads: http://download.osgeo.org/gdal
# - wget http://download.osgeo.org/gdal/2.2.2/gdal-2.2.2.tar.gz
rm -r gdal-2.2.2
tar -xzvf gdal-2.2.2.tar.gz
@emxsys
emxsys / build-libecwj2-3.3.sh
Created January 9, 2019 15:36
Building libecwj 3.3 library on Unix to /usr/local/libecwj2-3.3
#!/bin/bash
# ===============================================================================
# Building libecwj 3.3 library on Unix to /usr/local/libecwj2-3.3
# ===============================================================================
# Unzip the ECW library to the current folder
# - ftp://ftp.ii.net/pub/gentoo/distfiles/libecwj2-3.3-2006-09-06.zip
unzip libecwj2-3.3-2006-09-06.zip
===============================================================================
Building libecwj 3.3 library on Unix to /usr/local/libecwj2-3.3
===============================================================================
See: https://trac.osgeo.org/gdal/wiki/ECW
Download locations:
- ftp://ftp.ii.net/pub/gentoo/distfiles/libecwj2-3.3-2006-09-06.zip
$ unzip libecwj2-3.3-2006-09-06.zip
Download cumulative patch from GDAL wiki: https://trac.osgeo.org/gdal/wiki/ECW
#!/bin/bash
set +x
# LandSat files
for file in /nas/data/imagery/i3/*.tif; do
input_file=${file}
base_file=`basename ${file}`
gtiff_file=gtif/${base_file%.*}.tif
if [ -s $gtiff_file ]

Run Selected File

You must add worldwind.jar to the classpaths in WorldWindJava\nbproject\ide-file-targets.xml

<?xml version="1.0" encoding="UTF-8"?>
<project basedir=".." name="WorldWindJava-IDE">
    <!-- TODO: edit the following target according to your needs -->
    <!-- (more info: http://www.netbeans.org/kb/articles/freeform-config.html#runsingle) -->
    <target name="run-selected-file-in-src">
        <fail unless="run.class">Must set property 'run.class'</fail>
@emxsys
emxsys / http-get-dos.conf
Created March 21, 2019 23:32 — forked from SamStudio8/http-get-dos.conf
Simple fail2ban DOS jail
# Fail2Ban configuration file
#
# NOTE
# You should set up in the jail.conf file, the maxretry and findtime carefully in order to avoid false positives.
#
# Author: http://www.go2linux.org
# Modified by: samnicholls.net
# * Mon 6 Jun 2016 - Updated failregex to capture HOST group correctly
[Definition]
#!/usr/bin/env bash
# A best practices Bash script template with many useful functions. This file
# combines the source.sh & script.sh files into a single script. If you want
# your script to be entirely self-contained then this should be what you want!
# A better class of script...
set -o errexit # Exit on most errors (see the manual)
set -o errtrace # Make sure any error trap is inherited
set -o nounset # Disallow expansion of unset variables
@emxsys
emxsys / cleancache.sh
Last active February 27, 2022 14:00
Clean an Apache disk cache using a regex with htcacheclean
#!/usr/bin/env bash
# A best practices Bash script template with many useful functions. This file
# combines the source.sh & script.sh files into a single script. If you want
# your script to be entirely self-contained then this should be what you want!
# A better class of script...
set -o errexit # Exit on most errors (see the manual)
set -o errtrace # Make sure any error trap is inherited
set -o nounset # Disallow expansion of unset variables