Skip to content

Instantly share code, notes, and snippets.

View nurrony's full-sized avatar

Nur Rony nurrony

View GitHub Profile
@nurrony
nurrony / amz2023-install-tesseract.sh
Last active January 11, 2024 07:43
Install Tesseract v5.x.x and Training Data 4.1 on Amazon Linux 2023
#!/usr/bin/env bash
TESSERACT_VERSION=5.3.3
TESSERACT_TRDATA_VERSION=4.1.0
TESSERACT_FILE="$TESSERACT_VERSION.tar.gz"
TESSERACT_URL="https://github.com/tesseract-ocr/tesseract/archive/$TESSERACT_FILE"
LEPTONICA_VERSION=1.84.1
LEPTONICA_FILE=leptonica-$LEPTONICA_VERSION.tar.gz
@nurrony
nurrony / 0-README.md
Created November 21, 2023 15:52 — forked from aramalipoor/0-README.md
Secure Kafka brokers with SSL and expose externally in OpenShift/Kubernetes via a passthrough Route

Kafka SSL + OpenShift Routes

To expose Kafka port externally enable SSL/TLS configuration in Kafka.

  1. Build the image based on this Dockerfile
  2. Generate all keys and certificates based on gen.sh. Note Replace <YOUR_KAFKA_DOMAIN_HERE> and passphrase (i.e. test1234).
  3. Create a secret based to store all certificates:
    oc create secret generic kafka-ssl --from-file=/absolute/path/to/generated/certs/dir
  4. Update Kafka's Statefulset to enable SSL (statefulset.yml holds already patched version of our template):
#!/usr/bin/env bash
__usage() {
cat <<EOF
Exponential BackOff and Re-Try (EBORT)
Re-try a command with exponential backoff. The command is re-tried until it
either succeeds, or the maximum number of attempts is reached, or the maximum
wait time is reached.
@nurrony
nurrony / 01-network-manager-all.yaml
Last active October 24, 2023 12:09
network route
network:
version: 2
ethernets:
enp0s25: # Your Ethernet interface name (use 'ifconfig' or 'ip a' to find it)
dhcp4: true
optional: true
routes:
- to: 0.0.0.0/0
via: 192.168.1.1 # Your wired gateway IP
metric: 100
@nurrony
nurrony / README.md
Created January 27, 2023 19:53 — forked from jmruc/README.md
Generating pom.xml from gradle

To generate a pom.xml file just run gradle writeNewPom

If you want to generate it as pom.xml in the root of the project, replace writeTo("$buildDir/newpom.xml") with writeTo("pom.xml")

import java.math.BigDecimal;
import java.math.RoundingMode;
import java.text.NumberFormat;
import java.util.Arrays;
import java.util.Locale;
import java.util.function.BinaryOperator;
/**
* A simple utility class to calculate Money related calculation. It provides
@nurrony
nurrony / .. MediaCreationTool.bat ..md
Created October 25, 2021 10:24 — forked from AveYo/.. MediaCreationTool.bat ..md
Universal MediaCreationTool wrapper for all MCT Windows 10 versions from 1507 to 21H1 with business (Enterprise) edition support

We did it! We broke gist.github.com ;) So head over to the new home! Thank you all!
2021.10.20: https://github.com/AveYo/MediaCreationTool.bat now open for interaction

  • new update introducing no 11 setup checks on boot in VirtualBox

Not just an Universal MediaCreationTool wrapper script with ingenious support for business editions,
Preview
A powerful yet simple windows 10 / 11 deployment automation tool as well!

configure via set vars, commandline parameters or rename script like iso 21H2 Pro MediaCreationTool.bat
recommended windows setup options with the least amount of issues on upgrades set via auto.cmd

@nurrony
nurrony / sshtunnel.go
Created September 11, 2021 13:58 — forked from iamralch/sshtunnel.go
SSH tunnelling in Golang
package main
import (
"log"
"bufio"
"time"
"os"
"fmt"
"io"
"net"

ZSH CheatSheet

This is a cheat sheet for how to perform various actions to ZSH, which can be tricky to find on the web as the syntax is not intuitive and it is generally not very well-documented.

Strings

Description Syntax
Get a single character ${VARNAME[index]}
Get the string from a specific index ${VARNAME[index,-1]}
@nurrony
nurrony / main.dart
Created April 12, 2020 07:34 — forked from felangel/main.dart
Bloc with SearchDelegate
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:bloc/bloc.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {