Skip to content

Instantly share code, notes, and snippets.

View Hakky54's full-sized avatar
😈
Do What’s Right Not Easy

Hakan Altındağ Hakky54

😈
Do What’s Right Not Easy
View GitHub Profile
@Hakky54
Hakky54 / README.md
Created December 7, 2023 12:32 — forked from koshatul/README.md
use Apple Keychain to store GPG Passphrases

gpg-agent setup

Need to setup gpg-agent first, on OSX I use keychain (it also does ssh-agent)

$ brew info keychain
keychain: stable 2.8.5
User-friendly front-end to ssh-agent(1)
https://www.funtoo.org/Keychain
/usr/local/Cellar/keychain/2.8.5 (7 files, 108.5KB) *
@Hakky54
Hakky54 / docker-compose.yml
Last active December 15, 2022 16:35
Zookeeper Kafka Schemaregistry in Docker
---
version: "3.9"
services:
zookeeper:
image: confluentinc/cp-zookeeper:7.2.1
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
kafka:
@Hakky54
Hakky54 / starcounter.js
Last active August 28, 2022 01:55 — forked from yyx990803/starcounter.js
Count your total stars!
var https = require('https'),
user = process.argv[2],
opts = parseOpts(process.argv.slice(3))
request('/users/' + user, function (res) {
if (!res.public_repos) {
console.log(res.message)
return
}
var pages = Math.ceil(res.public_repos / 100),
@Hakky54
Hakky54 / cheat_sheet_http_client_ssl_configuration_for_java_kotlin_scala.md
Last active August 18, 2022 11:56
Cheat Sheet - Http Client SSL TLS Configuration for Java Kotlin and Scala with example http requests
@Hakky54
Hakky54 / GoogleAnalyticsTagIdAdded.java
Created May 25, 2021 20:24
Adding Google Analytics script to html files
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.StandardOpenOption;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
@Hakky54
Hakky54 / BRACES.MD
Last active December 10, 2020 09:29
Braces cheatsheet

braces-clipart-punctuation-6-original

@Hakky54
Hakky54 / curl-with-java-keystore.md
Last active August 26, 2024 13:14
Curl with Java KeyStore

Curl with Java KeyStore

Curl doesn't have support for java keystore file, so therefor the file should be converted to a PEM format. It consists of the following multiple steps:

  1. Convert keystore to p12 file
  2. Convert p12 file to pem file
  3. Run curl command with pem files

One way TLS/SSL/Authentication

Convert keystore to p12 file

@Hakky54
Hakky54 / openssl_commands.md
Last active December 17, 2024 13:16 — forked from p3t3r67x0/openssl_commands.md
OpenSSL Cheat Sheet - Some list of openssl commands for check and verify your keys

OpenSSL Cheat Sheet 🔐

Install

Install the OpenSSL on Debian based systems

sudo apt-get install openssl
@Hakky54
Hakky54 / README.md
Created October 14, 2019 04:46 — forked from hofmannsven/README.md
Git Cheatsheet
@Hakky54
Hakky54 / java_keytool_cheat_sheet.md
Last active December 18, 2024 12:27
Keytool Cheat Sheet - Some list of keytool commands for create, check and verify your keys

Keytool CheatSheet 🔐

Some history

This cheat sheet came into life when I started working on a tutorial of setting up one way tls and two way tls, which can be found here: GitHub - Mutual TLS SSL

Creation and importing

Generate a Java keystore and key pair

keytool -genkeypair -keyalg RSA -keysize 2048 -keystore keystore.jks -alias server -validity 3650