Skip to content

Instantly share code, notes, and snippets.

View gmic's full-sized avatar

Gerhard Messelink gmic

  • GMIC
  • Netherlands
View GitHub Profile
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>fop</artifactId>
<version>1.1</version>
<exclusions>
<exclusion>
<artifactId>avalon-framework-api</artifactId>
<groupId>org.apache.avalon.framework</groupId>
</exclusion>
<exclusion>
<?xml version="1.0"?>
<xsl:stylesheet version="2.0"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
exclude-result-prefixes="xhtml xsl xs">
<xsl:output method="xml" version="1.0" encoding="UTF-8" doctype-public="-//W3C//DTD XHTML 1.1//EN" doctype-system="http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd" indent="yes"/>
@gmic
gmic / gist:6040832
Created July 19, 2013 17:17
Copy same files to directory
find -type f -iname *.epub -exec cp {} books \;
#!/bin/sh
TOPDIR=$(dirname $0)
cd $TOPDIR
nohup java -jar selenium-server-standalone-2.42.2.jar -role hub -port 8001 > grid.log 2>&1 &
java -jar selenium-server-standalone-2.42.2.jar -role node -hub http://localhost:8001/grid/register -Dwebdriver.firefox.profile=xc-forms-selenium-tests
@gmic
gmic / nslookup.py
Last active September 11, 2018 01:05
Python nslookup
import subprocess
process = subprocess.Popen(["nslookup", "www.google.com"], stdout=subprocess.PIPE)
output = process.communicate()[0].split('\n')
ip_arr = []
for data in output:
if 'Address' in data:
ip_arr.append(data.replace('Address: ',''))
@gmic
gmic / report.sql
Created January 6, 2016 15:02
SQL report template
set echo off
set embedded on
set feedback off
set heading off
set linesize 2000
set pages 0
set recsep off
set termout off
set trim on
set trimspool on
@gmic
gmic / jython_install.sh
Created April 18, 2016 12:54
Add jython as virtualenv on Mac
# Add jython as virtualenv on Mac
brew install jython
virtualenv -p /usr/local/bin/jython jython-env --no-setuptools
. ./jython-env/bin/activate
wget https://bootstrap.pypa.io/ez_setup.py
python ez_setup.py --insecure
beeline -u "$KETL_JDBC_HIVE_URI" --hivevar bla=1 --hivevar ketl_env="${KETL_ENV}" -e "select 'hi\${hivevar:bla}: \${hivevar:ketl_env}';"
@gmic
gmic / SshSensorOperaror.py
Created January 26, 2017 12:06
Airflow ssh sensor
class SshSensorOperator(SSHExecuteOperator, BaseSensorOperator):
"""
Wait for some ssh command to succeed.
"""
count = 0
def poke(self, context):
"""
Function that checks for ssh command.
"""