Skip to content

Instantly share code, notes, and snippets.

View gerbsen's full-sized avatar

gerbsen gerbsen

View GitHub Profile
# http://stackoverflow.com/a/20056883
CREATE OR REPLACE FUNCTION db_to_csv(path TEXT) RETURNS void AS $$
declare
tables RECORD;
statement TEXT;
begin
FOR tables IN
SELECT (table_schema || '.' || table_name) AS schema_table
FROM information_schema.tables t INNER JOIN information_schema.schemata s
@gerbsen
gerbsen / ssh_agent_start.fish
Last active July 16, 2024 16:52 — forked from schaary/ssh_agent_start.fish
Auto-launching ssh-agent in fish shell
# content has to be in .config/fish/config.fish
# if it does not exist, create the file
setenv SSH_ENV $HOME/.ssh/environment
function start_agent
echo "Initializing new SSH agent ..."
ssh-agent -c | sed 's/^echo/#echo/' > $SSH_ENV
echo "succeeded"
chmod 600 $SSH_ENV
. $SSH_ENV > /dev/null
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>de.example</groupId>
<artifactId>services</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<name>services</name>
/**
*
*/
package org.aksw;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import java.sql.ResultSet;
@gerbsen
gerbsen / getRoutes
Last active January 2, 2016 07:39
Web service example configuration
/* getRoutes */
mi = {
format : "json | xml", // optional, default: json
output : "geometry | description | detailed", // default: description
source = [
{
coordinate : "52.1,13.2", // mandatory
id : 17231823, // mandatory
label : "My point", // optional