Skip to content

Instantly share code, notes, and snippets.

@Amiko
Amiko / UAgentInfo.java
Created August 15, 2017 13:04 — forked from bryanjswift/UAgentInfo.java
User Agent detection in Java
/* *******************************************
// LICENSE INFORMATION
// The code, "Detecting Smartphones Using PHP"
// by Anthony Hand, is licensed under a Creative Commons
// Attribution 3.0 United States License.
//
// Updated 01 March 2010 by Bryan J Swift
// - Remove un-needed if statements instead just returning the boolean
// inside the if clause
//
@Amiko
Amiko / gist:b5671d586c7ac22e55ffebb6d564ec42
Created April 7, 2017 12:55 — forked from hpadmanabhan/gist:9e3ab663f491798b897c
Java InetAddress wrapper for PostgreSQL inet data type for Hibernate
//Java bean wrapping InetAddress to enable Hibernate support for PostgreSQL inet type.
import java.io.Serializable;
import java.net.InetAddress;
@SuppressWarnings("serial")
public class PgInet implements Serializable {
private InetAddress address;
public PgInet() {}