Skip to content

Instantly share code, notes, and snippets.

View rbellamy's full-sized avatar

Richard Bellamy rbellamy

  • Ford Pro
  • Cotati, CA
View GitHub Profile
@rbellamy
rbellamy / Jenkinsfile
Last active February 14, 2017 00:03
Env Overwritten in Jenkins CPS Global Library
#!/usr/bin/env groovy
node {
echo "env - ${env}"
withTest {
args = "testing 1 2 3"
}
}
@rbellamy
rbellamy / loaders.js
Created November 22, 2016 17:00
webpack configuration
'use strict';
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const path = require('path');
exports.tslint = {
test: /\.ts$/,
loader: 'tslint',
exclude: [
@rbellamy
rbellamy / DockerHelperPlugin.scala
Last active November 4, 2016 18:19
Docker Helper Plugin
import sbt.{Process, _}
import Keys._
import com.typesafe.sbt.packager.docker.{DockerAlias, DockerPlugin}
import com.typesafe.sbt.packager.docker.DockerPlugin.autoImport._
import com.typesafe.sbt.packager.universal.UniversalPlugin.autoImport.stage
/*
* This helper plugin manipulates the behavior of the [[com.typesafe.sbt.packager.DockerPlugin]] in the following ways
* 1. Modifies the [[dockerAlias]] to NOT include the [[dockerRepository]] by default. This allows us to publish local
* docker images in the form of <package name>:<package version> - this makes them more easily launched from the local
2016/09/21 18:00:56 INFO: Starting registry...
2016/09/21 18:00:56 INFO: using minio as the backend
time="2016-09-21T18:00:56.36848157Z" level=warning msg="No HTTP secret provided - generated random secret. This may cause problems with uploads if multiple registries are behind a load-balancer. To provide a shared secret, fill in http.secret in the configuration file or set the REGISTRY_HTTP_SECRET environment variable." go.version=go1.6.2 instance.id=6b5d6bf4-7c14-47ee-88ae-44f018fb65b2 service=registry version=v2.1.1-601-g0afef00
time="2016-09-21T18:00:56.368673837Z" level=info msg="redis not configured" go.version=go1.6.2 instance.id=6b5d6bf4-7c14-47ee-88ae-44f018fb65b2 service=registry version=v2.1.1-601-g0afef00
time="2016-09-21T18:00:56.374940909Z" level=info msg="Starting upload purge in 50m0s" go.version=go1.6.2 instance.id=6b5d6bf4-7c14-47ee-88ae-44f018fb65b2 service=registry version=v2.1.1-601-g0afef00
time="2016-09-21T18:00:56.418404172Z" level=info msg="listening on [::]:5000" go.version=go1.6.2
@rbellamy
rbellamy / pg_schema_split.py
Created April 8, 2016 18:54
Split schema-only PostgreSQL dumps for source control
#! /usr/bin/python
import os, re, sys
# Split pg_dump files to schema/type file hierarchy
# Use with files produced by pg_dump -s
#TODO: Identify dropped objects and delete from tree
# Detect object header lines
re_obj = re.compile(r'-- Name: ([-\w\s\.]+)(?:\([-\w\s\[\],]*\))?; Type: ([-\w\s]+); Schema: ([-\w]+); Owner: ([-\w]*)(?:; Tablespace: )?([-\w]*)\n', flags=re.IGNORECASE)
apply plugin:EnterpriseRepositoryPlugin
class EnterpriseRepositoryPlugin implements Plugin<Gradle> {
private static String TERRADATUM_REPOSITORY_URL = "https://nexus.terradatum.com/content/groups/public"
void apply(Gradle gradle) {
// ONLY USE ENTERPRISE REPO FOR DEPENDENCIES
gradle.allprojects{ project ->
@rbellamy
rbellamy / NumberTbl.java
Last active February 9, 2016 06:57
PPAS codegen
public class NumberTbl extends JdbcArrayList<java.math.BigDecimal> {
private final ArrayList<BigDecimal> delegate;
public static final String SQL_TYPE_NAME = "terradatum.number_tbl";
/**
* Instance initializor block - necessary because the {@link ArrayList} was null in the constructor during the below
* call to {@code super(array)} - which in turn calls {@code this.add}, thereby throwing a {@link NullPointerException}
*/
{
delegate = new ArrayList<>();
package com.terradatum.jooq.util.postgresplus;
import org.jooq.util.*;
import org.jooq.util.postgres.PostgresDataType;
import org.jooq.util.postgres.PostgresTableDefinition;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
@rbellamy
rbellamy / 0001-Honor-IDEA_JDK-set-by-environment.patch
Created January 1, 2016 01:30
intellij-idea-ultimate-edition AUR patch
From 98898a025749769615ea53bcd0271174c62ca89d Mon Sep 17 00:00:00 2001
From: "G. Richard Bellamy" <[email protected]>
Date: Thu, 31 Dec 2015 15:03:57 -0800
Subject: [PATCH] Honor IDEA_JDK set by environment
---
PKGBUILD | 5 ++---
intellijidea.sh | 3 ++-
2 files changed, 4 insertions(+), 4 deletions(-)
@rbellamy
rbellamy / compaudit-permission-fix.sh
Last active November 26, 2015 22:04
complete:13: command not found: compdef
#from https://github.com/robbyrussell/oh-my-zsh/issues/630#issuecomment-70291622
#This will perform chmod g-w for each file returned by compaudit to remove write access for group
compaudit | xargs -I % chmod g-w "%"
#This will perform chown to current user (Windows and Linux) for each file returned by compaudit
compaudit | xargs -I % chown $USER "%"
#Remove all dump files (which normally speed up initialization)
rm ~/.config/zsh/.zcompdump*
#Regenerate completions file
compinit