Skip to content

Instantly share code, notes, and snippets.

View dvliman's full-sized avatar

David Liman dvliman

View GitHub Profile
-- setup.sql
CREATE DATABASE demo;
CREATE TABLE users (
user_id SERIAL PRIMARY KEY,
name TEXT NOT NULL,
email TEXT NOT NULL UNIQUE
);
package com.guardtime.amgenlink
import com.sun.org.apache.xerces.internal.dom.DOMInputImpl
import com.sun.org.apache.xerces.internal.impl.xs.XSComplexTypeDecl
import com.sun.org.apache.xerces.internal.impl.xs.XSImplementationImpl
import com.sun.org.apache.xerces.internal.impl.xs.XSModelGroupImpl
import com.sun.org.apache.xerces.internal.impl.xs.XSParticleDecl
import com.sun.org.apache.xerces.internal.xs.*
import org.w3c.dom.bootstrap.DOMImplementationRegistry
import org.w3c.dom.ls.LSInput
@dvliman
dvliman / pipejine.clj
Created July 2, 2018 07:21
pipejine-core
(ns pipejine.core
(:require [clojure.tools.logging :as log]
[clojure.stacktrace :as st])
(:import [java.util.concurrent LinkedBlockingQueue CountDownLatch TimeUnit]
[org.slf4j MDC]))
(defn new-queue
"Create and initialize a new queue"
[{:keys [name queue-size number-of-consumer-threads number-of-producers partition time-out]
:or {name (gensym name), queue-size 1, number-of-consumer-threads 1,
@dvliman
dvliman / async_util.clj
Created July 2, 2018 06:52 — forked from echeran/async_util.clj
Utility functions for core.async 0.1.346.0-17112a-alpha to create a linear pipeline of go-routines in a Storm-esque way.
(ns your.namespace.async-util
(:require
[clojure.core.async :as a :refer [>! <! >!! <!! go chan buffer
close! thread alts! alts!! timeout]]
[clojure.core.match :as match :refer [match]]))
;;
;; core.async util fns
;;
{
"id": "3f5d6a4e-c284-4f78-bfdf-7669b45af907",
"name": "Uber",
"legalName": "Uber Technologies, Inc.",
"domain": "uber.com",
"domainAliases": [
"uber.org",
"ubercab.com"
],
"site": {
/*
Theme Name: Wellington
Theme URI: https://themezee.com/themes/wellington/
Author: ThemeZee
Author URI: https://themezee.com
Description: Wellington is a clean and simple Magazine WordPress theme with beautiful typography and subtle colors. The theme includes two different post layouts, a featured post slider and thoughtful theme settings in the Customizer.
Version: 1.3
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: wellington
/* cat -- concatenate files and print on the standard output.
Copyright (C) 1988-2018 Free Software Foundation, Inc.
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
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
to uninstall java:
sudo rm -fr /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin
sudo rm -fr /Library/PreferencePanes/JavaControlPanel.prefPane
sudo rm -fr ~/Library/Application\ Support/Java
to uninstall jdk:
sudo rm -rf /Library/Java/JavaVirtualMachines/[version].jdk
@dvliman
dvliman / gist:cd2d3316edf2c852d2a4df86cd2a2781
Created February 23, 2018 22:27
verify fingerprint of .pem file
openssl pkcs8 -in keypair.pem -inform PEM -outform DER -topk8 -nocrypt | openssl sha1 -c
@dvliman
dvliman / main.go
Created January 7, 2018 19:22 — forked from enricofoltran/main.go
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
package main
import (
"context"
"flag"
"fmt"
"log"
"net/http"
"os"
"os/signal"