Skip to content

Instantly share code, notes, and snippets.

View arkadiusjonczek's full-sized avatar
🏴‍☠️

Arkadius Jonczek arkadiusjonczek

🏴‍☠️
View GitHub Profile
@willwm
willwm / campbell.json
Last active August 2, 2023 17:55
Campbell Color Scheme
{
"name" : "Campbell",
"cursorColor": "#FFFFFF",
"selectionBackground": "#FFFFFF",
"background" : "#0C0C0C",
"foreground" : "#CCCCCC",
"black" : "#0C0C0C",
@kacole2
kacole2 / harbor.sh
Last active May 13, 2024 19:39
Quick Start Harbor Installation Script on Ubuntu 18.04
#!/bin/bash
#Harbor on Ubuntu 18.04
#Prompt for the user to ask if the install should use the IP Address or Fully Qualified Domain Name of the Harbor Server
PS3='Would you like to install Harbor based on IP or FQDN? '
select option in IP FQDN
do
case $option in
IP)
@dhana-git
dhana-git / Guide on Microservices: Backups and Consistency.md
Created March 29, 2019 09:28
Guide on Microservices: Backups and Consistency | Consistent Disaster Recovery for Microservices - the BAC Theorem

Guide on Microservices: Backups and Consistency | Consistent Disaster Recovery for Microservices - the BAC Theorem


The BAC (Backup Availability Consistency) Theorem

When backing up an entire microservices architecture, it is not possible to have both availability and consistency.

  • Eventual Inconsistency with Full Availability (High Availability)
    • When making an independent backup of the state (the event log) of each service, it is possible that one service will be backed up before the event is added to the log, while the other service will be backed up after the corresponding event is added to its log. When restoring the services from backup, only one of the two services will recover its complete log. The global state of the microservice architecture will thus become inconsistent after restoring it from backup.
    • Possible problems,
  • Broken link
@mohanpedala
mohanpedala / bash_strict_mode.md
Last active May 29, 2024 14:02
set -e, -u, -o, -x pipefail explanation
@tsandall
tsandall / gist:c7b57b5f96b77765ef416fba6f8e9f3e
Last active May 29, 2023 23:44
Example of verifying JWTs signed with RS256 in OPA
package example
cert = `-----BEGIN CERTIFICATE-----
MIIFiDCCA3ACCQCGV6XsfG/oRTANBgkqhkiG9w0BAQUFADCBhTELMAkGA1UEBhMC
VVMxEzARBgNVBAgMCkNhbGlmb3JuaWExFTATBgNVBAcMDFJlZHdvb2QgQ2l0eTEO
MAwGA1UECgwFU3R5cmExDDAKBgNVBAsMA0RldjESMBAGA1UEAwwJbG9jYWxob3N0
MRgwFgYJKoZIhvcNAQkBFglhc2hAc3R5cmEwHhcNMTgwMzA2MDAxNTU5WhcNMTkw
MzA2MDAxNTU5WjCBhTELMAkGA1UEBhMCVVMxEzARBgNVBAgMCkNhbGlmb3JuaWEx
FTATBgNVBAcMDFJlZHdvb2QgQ2l0eTEOMAwGA1UECgwFU3R5cmExDDAKBgNVBAsM
A0RldjESMBAGA1UEAwwJbG9jYWxob3N0MRgwFgYJKoZIhvcNAQkBFglhc2hAc3R5
@ThomasVitale
ThomasVitale / Main.java
Last active June 11, 2023 08:54
Keycloak Admin REST API for Java
import com.sun.org.apache.regexp.internal.RE;
import org.jboss.resteasy.client.jaxrs.ResteasyClientBuilder;
import org.keycloak.admin.client.Keycloak;
import org.keycloak.admin.client.KeycloakBuilder;
import org.keycloak.admin.client.resource.UserResource;
import org.keycloak.admin.client.resource.UsersResource;
import org.keycloak.representations.idm.CredentialRepresentation;
import org.keycloak.representations.idm.UserRepresentation;
import java.util.Arrays;
<?php
/**
* Coin Dashboard by Christian Haschek
* https://blog.haschek.at
*
* Donations always welcome
* BTC: 1ChrisHMgr4DvEVXzAv1vamkviZNLPS7yx
* ETH: 0x1337C2F18e54d72d696005d030B8eF168a4C0d95
*
* Read more at
@pierrejoubert73
pierrejoubert73 / markdown-details-collapsible.md
Last active May 29, 2024 13:29
How to add a collapsible section in markdown.

How to add a collapsible section in markdown

1. Example

Click me

Heading

  1. Foo
  2. Bar
    • Baz
  • Qux
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active May 29, 2024 14:12
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@wojteklu
wojteklu / clean_code.md
Last active May 29, 2024 11:51
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules