Skip to content

Instantly share code, notes, and snippets.

@sccvn
sccvn / reinvent.md
Created October 9, 2024 15:54 — forked from henrysher/reinvent.md
link for reinvent slides
@sccvn
sccvn / 00-project-reactor-from-zero-to-hero.md
Created September 25, 2024 02:30 — forked from Lukas-Krickl/00-project-reactor-from-zero-to-hero.md
A java project reactor tutorial/discussion reaching from basic concepts to reactor internal implementation details.

Project Reactor: From Zero to Hero

In this series of pages, I will discuss project reactor and reactive programming from basic concepts to reactor internal implementation details. This discussion is based on the official reference documentation, the java-doc, talks by maintainers of reactor e.g. at the spring I/O and other distributed material, and should summarise and connect all this information. It should complement the official reference documentation and java-doc. Although the name says "from zero to hero", basic knowledge about the library is advised to fully benefit from it.

As a short disclaimer, I am a professional software engineer with some years of experience in using reactor, but not a maintainer or creator of the library. Information and knowledge in this post are based on the official documentation and talks, but I cannot exclude misconceptions on my side.


  1. [Why and when to use Reactor](https://gist.github.com/Lukas-Krickl/50f1daebebaa72c7e944b7c319e3c073#file-01-why-and-when-to-use
@sccvn
sccvn / README-setup-tunnel-as-systemd-service.md
Created September 3, 2024 10:07 — forked from drmalex07/README-setup-tunnel-as-systemd-service.md
Setup a secure (SSH) tunnel as a systemd service. #systemd #ssh #ssh-tunnel #ssh-forward

README

Create a template service file at /etc/systemd/system/[email protected]. The template parameter will correspond to the name of target host:

[Unit]
Description=Setup a secure tunnel to %I
After=network.target
@sccvn
sccvn / jpa-cheatsheet.java
Created September 3, 2024 04:56 — forked from jahe/jpa-cheatsheet.java
JPA Cheatsheet
/*
JPA (Java Persistence API)
Transaction Management with an Entity-Mananger:
---
entityManager.getTransaction().begin();
entityManager.persist(<some-entity>);
entityManager.getTransaction().commit();
entityManager.clear();
@sccvn
sccvn / pre-commit
Created July 31, 2024 14:52 — forked from arnobroekhof/pre-commit
Maven pre commit hook
#!/bin/bash
# save the file as <git_directory>/.git/hooks/pre-commit
echo "Running Maven clean test for errors"
# retrieving current working directory
CWD=`pwd`
MAIN_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# go to main project dir
cd $MAIN_DIR/../../

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database

@sccvn
sccvn / mysql_cheat_sheet.md
Created July 18, 2024 14:54 — forked from bradtraversy/mysql_cheat_sheet.md
MySQL Cheat Sheet

MySQL Cheat Sheet

Help with SQL commands to interact with a MySQL database

MySQL Locations

  • Mac /usr/local/mysql/bin
  • Windows /Program Files/MySQL/MySQL version/bin
  • Xampp /xampp/mysql/bin

Add mysql to your PATH

@sccvn
sccvn / JsonUtils.java
Created July 18, 2024 01:42 — forked from cpeeyush/JsonUtils.java
Common Json Utilities based on jackson
package com.peeyush.common.utils;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.core.JsonGenerationException;
import com.fasterxml.jackson.core.JsonParseException;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.JsonMappingException;
import com.fasterxml.jackson.databind.JsonNode;
@sccvn
sccvn / docker-compose.yml
Created July 16, 2024 15:02 — forked from onjin/docker-compose.yml
example docker compose for postgresql with db init script
postgres:
image: postgres:9.4
volumes:
- ./init.sql:/docker-entrypoint-initdb.d/init.sql