Skip to content

Instantly share code, notes, and snippets.

Avatar

Ümit Ünal umit

View GitHub Profile
@umit
umit / README-Template.md
Created Sep 17, 2020 — forked from PurpleBooth/README-Template.md
A template to make good README.md
View README-Template.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

View things-i-believe.md

Things I believe

This is a collection of the things I believe about software development. I have worked for years building backend and data processing systems, so read the below within that context.

Agree? Disagree? Feel free to let me know at @JanStette. See also my blog at www.janvsmachine.net.

Fundamentals

Keep it simple, stupid. You ain't gonna need it.

@umit
umit / pub_sub_test.go
Created Dec 3, 2019
Pub sub testcontainers for gcp
View pub_sub_test.go
import (
"cloud.google.com/go/pubsub"
"context"
"fmt"
"github.com/testcontainers/testcontainers-go/wait"
"log"
"net/http"
"os"
"time"
View BasicTcpClient.java
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.net.Socket;
public final class BasicTcpClient implements AutoCloseable {
private static final int READ_BUF_LEN = 4096;
private final Socket socket;
@umit
umit / HandlerMethodArgumentResolverTest.java
Created Nov 19, 2018
HandlerMethodArgumentResolverTest.java
View HandlerMethodArgumentResolverTest.java
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.MethodParameter;
import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.junit4.SpringRunner;
@umit
umit / kubeconfig.yaml
Last active Sep 24, 2018
Minikube Config
View kubeconfig.yaml
apiVersion: v1
clusters:
- cluster:
certificate-authority: /Users/umitunal/.minikube/ca.crt
server: https://192.168.99.100:8443
name: minikube
contexts:
- context:
cluster: minikube
user: minikube
@umit
umit / dashboard-full-access.yaml
Created Sep 13, 2018
dashboard-full-access.yaml
View dashboard-full-access.yaml
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
name: kubernetes-dashboard
labels:
k8s-app: kubernetes-dashboard
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cluster-admin
@umit
umit / ElasticsearchConfigTest.java
Created Aug 31, 2018
Elasticsearch Test Containers
View ElasticsearchConfigTest.java
import org.elasticsearch.action.index.IndexResponse;
import org.elasticsearch.client.Client;
import org.junit.ClassRule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
import org.testcontainers.containers.FixedHostPortGenericContainer;
import org.testcontainers.containers.GenericContainer;
@umit
umit / docker-compose.yaml
Last active Jul 4, 2018
Elasticsearch Docker compose
View docker-compose.yaml
version: '2.2'
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:6.2.4
container_name: elasticsearch
environment:
- cluster.name=docker-cluster
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ulimits:
@umit
umit / pom.xml
Created Jun 6, 2018
Liquibase diff from prod
View pom.xml
<plugin>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-maven-plugin</artifactId>
<version>3.6.1</version>
<configuration>
<driver>org.postgresql.Driver</driver>
<url>jdbc:postgresql://localhost:5432/api</url>
<username>root</username>
<password>123qwe</password>
You can’t perform that action at this time.