Skip to content

Instantly share code, notes, and snippets.

@ham1
ham1 / rgm3800-v25.py
Created January 18, 2016 21:01
rgm3800py
#!/usr/bin/env python
#
# This is a program to read data off a RoyalTek RGM 3800 GPS data logger.
# Copyright in 2007, 2008, 2009 by Karsten Petersen <kapet@kapet.de>
#
# Contributions by Stephen Hildrey <steve@uptime.org.uk>
# and Jens-Uwe Hagenah <>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
import com.frameworkium.core.ui.annotations.Visible;
import com.frameworkium.core.ui.pages.BasePage;
import org.openqa.selenium.WebElement;
public abstract class AbstractSomethingPage<T extends BasePage<T>> extends BasePage<T> {
@Visible
private WebElement foo;
public void doSomething() {
@ham1
ham1 / HandleMultiDestination.java
Last active October 16, 2016 09:50
Handling links which could return different page objects
package ai.pages;
import com.frameworkium.core.ui.annotations.Visible;
import com.frameworkium.core.ui.pages.BasePage;
import com.frameworkium.core.ui.pages.PageFactory;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
public class Test extends BasePage<Test> {

Keybase proof

I hereby claim:

  • I am ham1 on github.
  • I am ham1 (https://keybase.io/ham1) on keybase.
  • I have a public key ASA4SU2Lqtlyy1Kb8xYR2l5vjsUORVXhGY-9wfjxSss7HQo

To claim this, I am signing this object:

@ham1
ham1 / vmstat-to-influxdb.sh
Last active November 10, 2020 16:28
Using Bash (vmstat, awk and curl) we can send Linux machine metrics
#!/bin/bash
# Defensive bash script settings
set -o nounset -o pipefail -o errexit -o verbose -o noglob
# Runs vmstat every 1 second and sends results to InfluxDB
vmstat 1 | awk -vhost_name=$HOSTNAME '/ [0-9]/ {
timestamp=systime()"000000000"
tags="host="host_name