Skip to content

Instantly share code, notes, and snippets.

View nikos's full-sized avatar

Niko Schmuck nikos

View GitHub Profile
@nikos
nikos / Dockerfile
Last active August 29, 2015 14:10
MarkLogic Server 8 EA Dockerfile
# Requirements:
# - download MarkLogic EA 8 (MarkLogic-8.0-20141124.x86_64.rpm) into
# same directory like this Dockerfile
#
# Build your own image:
# docker build -t centos-marklogic8 .
#
# Start a new container with this image:
# docker run -p 8000:8000 -p 8001:8001 centos-marklogic8
@bsweger
bsweger / useful_pandas_snippets.md
Last active March 4, 2026 19:59
Useful Pandas Snippets

Useful Pandas Snippets

A personal diary of DataFrame munging over the years.

Data Types and Conversion

Convert Series datatype to numeric (will error if column has non-numeric values)
(h/t @makmanalp)

@soofaloofa-zz
soofaloofa-zz / On choosing a hypermedia type
Last active October 14, 2023 07:23
On choosing a hypermedia type for your API - HAL, JSON-LD, Collection+JSON, SIREN, Oh My!
A comparison of Collection+JSON, HAL, JSON-LD and SIREN media types.
Discussion at
http://sookocheff.com/posts/2014-03-11-on-choosing-a-hypermedia-format/
@theotherian
theotherian / ClientFactory.java
Last active July 23, 2020 11:21
configuring Jersey 2 client
import javax.ws.rs.client.Client;
import javax.ws.rs.client.ClientBuilder;
import org.apache.http.HttpHost;
import org.apache.http.conn.routing.HttpRoute;
import org.apache.http.impl.conn.PoolingClientConnectionManager;
import org.glassfish.jersey.apache.connector.ApacheClientProperties;
import org.glassfish.jersey.apache.connector.ApacheConnector;
import org.glassfish.jersey.client.ClientConfig;
import org.glassfish.jersey.client.ClientProperties;
@rgreenjr
rgreenjr / postgres_queries_and_commands.sql
Last active June 4, 2026 21:14
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
@deas
deas / DBBFSearch.groovy
Created March 23, 2012 13:58
Generic Brute Force SQL Search - Groovy Style
#!/usr/bin/env groovy
/*
* deas - http://www.contentreich.de/generic-brute-force-sql-search-groovy-style
*
* Created on Mar 15, 2012
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0