Skip to content

Instantly share code, notes, and snippets.

View marijani101's full-sized avatar

marijani101

View GitHub Profile
@marijani101
marijani101 / clickhouse-spring-boot-3.md
Created July 20, 2024 07:26
Connecting Spring boot 3 with Clickhouse via the JDBC connector
  1. Add JDBC as well as a dialect converter (still not sure how the dialect converter works)
     <dependency>
            <groupId>io.github.pelenthium</groupId>
            <artifactId>clickhouse-dialect-spring-boot-starter</artifactId>
            <version>1.2.0</version>
            <type>pom</type>
        </dependency>

 
/**
*
* @author Christian Berndt
* @created 2017-12-19 12:31
* @modified 2018-01-16 13:16
* @version 1.0.2
*
*/

Handling if-else logic It happens often that you need to handle a lot of different logic depending on the condition, an inexperienced developer will end up in something like this:

OPEN = 1
IN_PROGRESS = 2
CLOSED = 3
def handle_open_status():
    print('Handling open status')
def handle_in_progress_status():
    print('Handling in progress status')
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
// jitsiroomlist 2020-04-25 22:00 CEST
#define VERSION "0.2"
//
// This program filters jicofo log and prints a list of existing
// conference rooms. Inspired by an idea of Joost Snellink.
// (c) 2020 Markus B. Weber
//
// compile: gcc jitsiroomlist.c -o jitsiroomlist
//
const char* helptext=
@marijani101
marijani101 / ubuntu-hardening.md
Created April 27, 2020 08:23 — forked from lokhman/ubuntu-hardening.md
List of things for hardening Ubuntu

System Updates

http://bookofzeus.com/harden-ubuntu/initial-setup/system-updates/

Keeping the system updated is vital before starting anything on your system. This will prevent people to use known vulnerabilities to enter in your system.

sudo apt-get update
sudo apt-get upgrade
sudo apt-get autoremove
sudo apt-get autoclean
cat /etc/services | awk '{ print $2 }' | tr -d './[:alpha:]' | sort -n | uniq | awk '$1<1024' | \grep "\S"
@marijani101
marijani101 / webdev_online_resources.md
Created February 16, 2020 09:13 — forked from bradtraversy/webdev_online_resources.md
Online Resources For Web Developers (No Downloading)