Skip to content

Instantly share code, notes, and snippets.

View javabrett's full-sized avatar

Brett Randall javabrett

View GitHub Profile
@javabrett
javabrett / cleanassemblethencheck.txt
Created December 19, 2017 03:37
cleanassemblethencheck.txt
$ ./gradlew --console=verbose clean assemble
> Task :clean
> Task :compileJava
> Task :processResources
> Task :classes
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'org.gretty:gretty:2.1.0'
}
}
@javabrett
javabrett / celery_tasks_error_handling.py
Created July 10, 2018 06:27 — forked from darklow/celery_tasks_error_handling.py
Celery tasks error handling example
from celery import Task
from celery.task import task
from my_app.models import FailedTask
from django.db import models
@task(base=LogErrorsTask)
def some task():
return result
class LogErrorsTask(Task):
---
Get a single conversation from id.
The state field in conversation payload may take one of the following status
- **normalState** : Default state for conversation
- **waitForFirstMessage** : Message count equals 0
- **waitingForPermission** : Message count equals 1 and current user created conversation
swagger: "2.0"
tags:
- users
parameters:
- in: path
name: username
type: string
required: true
responses:
200:
I deployed to PythonAnywhere
It worked it worked I had no care
I used the lovely API
It told the truth it did not lie

But then I found I need DELETE
Then my script would be replete
Then surely I could redeploy
And my world is filled with joy
@javabrett
javabrett / TibJmsPoke.java
Created October 21, 2019 01:04
TIBCO EMS client test
package test;
import javax.jms.Connection;
import javax.jms.ConnectionFactory;
import javax.jms.JMSException;
import com.tibco.tibjms.TibjmsConnectionFactory;
public class TibJmsPoke {
public static void main(String[] args) throws JMSException {
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: gtfs-realtime.proto
package main
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
math "math"
)
FROM ubuntu:18.04
ENV SASL_MECHANISMS="PLAIN"
ENV SECURITY_PROTOCOL="SASL_SSL"
RUN apt-get update && \
apt-get install -y python3 python3-pip curl vim git build-essential zlib1g-dev libssl-dev libsasl2-dev libzstd-dev libcurl4-openssl-dev liblz4-dev rapidjson-dev
RUN git clone https://github.com/confluentinc/librdkafka.git && \
cd librdkafka && \
@javabrett
javabrett / Dockerfile
Created October 18, 2020 11:00
Build kafkacat on Centos 8
FROM centos:centos8.2.2004
RUN yum update -y && \
yum group install -y "Development Tools" && \
yum install -y git cyrus-sasl-devel cmake libcurl-devel
RUN git clone https://github.com/edenhill/kafkacat.git && \
cd kafkacat/ && \
./bootstrap.sh && \
./kafkacat -h