Skip to content

Instantly share code, notes, and snippets.

View omnisis's full-sized avatar

Clifford James omnisis

View GitHub Profile
@omnisis
omnisis / Jenkinsfile
Created February 16, 2018 01:11 — forked from bvis/Jenkinsfile
Jenkin pipeline definition example to be integrated with Docker Swarm cluster in our CI/CD environment
pipeline {
agent { node { label 'swarm-ci' } }
environment {
TEST_PREFIX = "test-IMAGE"
TEST_IMAGE = "${env.TEST_PREFIX}:${env.BUILD_NUMBER}"
TEST_CONTAINER = "${env.TEST_PREFIX}-${env.BUILD_NUMBER}"
REGISTRY_ADDRESS = "my.registry.address.com"
SLACK_CHANNEL = "#deployment-notifications"
@omnisis
omnisis / nexus-uploader.py
Last active October 4, 2023 08:26
Uploads a local M2 repo to a remote Nexus Server
#!/usr/bin/env python
""""
nexus-uploader.py
Allows mirroring local M2 repositories to a remote Nexus server with a single command.
Supports:
- uploading of common classifiers (sources, javadocs) if available
- using regex include pattern for artifactIds/groupIds
- recursively processing local repo, just point to the root
@omnisis
omnisis / Projects.md
Last active March 9, 2017 02:31
Interesting Opensource Projects

Infrastructure

Hystrix is a latency and fault tolerance library designed to isolate points of access to remote systems, services and 3rd party libraries, stop cascading failure and enable resilience in complex distributed systems where failure is inevitable.

Cloud/BigData Development

Genie is a completely open source federated job orchestration engine developed by Netflix. Genie provides REST-ful APIs to run a variety of big data jobs like Hadoop, Pig, Hive, Spark, Presto, Sqoop and more. It also provides APIs for managing the metadata of many distributed processing clusters and the commands and applications which run on them.

@omnisis
omnisis / AnsiColors.scala
Last active March 8, 2017 08:41
Scala Akka Boilerplate
package examples.utils
object AnsiColors {
val ANSI_RESET = "\u001B[0m"
val ANSI_BLACK = "\u001B[30m"
val ANSI_RED = "\u001B[31m"
val ANSI_GREEN = "\u001B[32m"
val ANSI_YELLOW = "\u001B[33m"
@omnisis
omnisis / AkkHttp.scala
Created March 7, 2017 05:10
Akka-Http Example
package examples.webserver
import java.sql.Timestamp
import java.util.Date
import akka.actor.ActorSystem
import akka.http.scaladsl.Http
import akka.http.scaladsl.marshallers.sprayjson.SprayJsonSupport
import akka.http.scaladsl.model._
import akka.http.scaladsl._
#!/bin/sh
remove_dangling() {
echo "Removing dangling images ..."
docker rmi $(docker images -f dangling=true -q)
}
remove_stopped_containers() {
echo "Removing stopped containers ..."
docker rm $(docker ps -qa)
package tutorial.storm
import backtype.storm.utils.Utils
import backtype.storm.{LocalCluster, StormSubmitter, Config}
import backtype.storm.generated.StormTopology
import com.typesafe.scalalogging.slf4j.LazyLogging
import org.rogach.scallop._
class RunnerOptions(arguments: Seq[String]) extends ScallopConf(arguments) {
@omnisis
omnisis / gist:1252de6ea9f054cd84ae
Created January 26, 2015 06:08
Example Scallop CommandHandler
package com.nextinstruction.scalacommands
object Commands extends App {
import org.rogach.scallop._
import org.rogach.scallop.exceptions._
class ToolConf(toolArgs: Seq[String]) extends ScallopConf(toolArgs) {
//version("\nv0.0.1 (c) Not Implemented Industries, LLC.")
banner("""
|usage: git [--version] [--help] [-C <path>] [-c name=value]
@omnisis
omnisis / *ensime-events*
Created January 24, 2015 03:25
Ensime Issues
(:swank-rpc
(swank:connection-info)
1)
(:return
(:ok
(:pid nil :implementation
(:name "ENSIME-ReferenceServer")
:version "0.8.10"))
1)
(:swank-rpc
@omnisis
omnisis / activemq.xml
Last active November 20, 2020 17:57
AMQ with SSL
<broker>
<transportConnectors>
<!-- DOS protection, limit concurrent connections to 1000 and frame size to 100MB -->
<transportConnector name="openwire" uri="tcp://0.0.0.0:61616?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
<transportConnector name="ssl" uri="ssl://0.0.0.0:61617?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600&amp;needClientAuth=true"/>
</transportConnectors>
<plugins>
<jaasDualAuthenticationPlugin configuration="activemq-domain" sslConfiguration="activemq-ssl-domain"/>
</plugins>