Skip to content

Instantly share code, notes, and snippets.

View concosminx's full-sized avatar

Cosmin Constantin concosminx

  • Pitesti, Romania
View GitHub Profile
@concosminx
concosminx / README.md
Created December 11, 2023 11:24
How to update a forked repo with git rebase

add original repo, fetch all branches, rewrite your master with upstream master

git remote add upstream https://github.com/original-repo/goes-here.git
git fetch upstream
git rebase upstream/master

add force if you need it

git push origin master --force
@concosminx
concosminx / create_constraint_if_not_exists.sql
Created March 17, 2023 09:25 — forked from estysdesu/create_constraint_if_not_exists.sql
[PostgreSQL: create constraint if not exists] not sure of sql compatibility with other engines #postgres #constraint #sql
// vim: syntax=sql
CREATE OR REPLACE FUNCTION create_constraint_if_not_exists (t_name text, c_name text, constraint_sql text)
RETURNS void
AS
$BODY$
BEGIN
-- Look for our constraint
IF NOT EXISTS (SELECT constraint_name
FROM information_schema.constraint_column_usage
@concosminx
concosminx / !Nginx Basic Auth.md
Created October 31, 2022 16:40 — forked from laurentbel/!Nginx Basic Auth.md
Nginx reverse proxy with basic authentication

Nginx Basic Auth

A simple demo of using Nginx as a reverse proxy to add basic authentication.

@concosminx
concosminx / Run android emulator.md
Created August 19, 2022 05:02
Run android emulator

%ANDROID_SDK_ROOT%\tools\emulator -avd Pixel_2_API_29 -verbose -show-kernel

@concosminx
concosminx / keycloak-wildfly-mutual-ssl.txt
Created June 7, 2022 06:54 — forked from gyfoster/keycloak-wildfly-mutual-ssl.txt
Instructions for enabling mutual SSL in Keycloak and WildFly
ROOT CA
--------------
Generate the CA private key:
$ openssl genrsa -out ca.key 2048
Create and self sign the root certificate:
$ openssl req -new -x509 -key ca.key -out ca.crt
Import root CA certificate into truststore:
$ keytool -import -file ca.crt -keystore ca.truststore -keypass <password> -storepass <password>
@concosminx
concosminx / create_x509_certs.md
Created June 6, 2022 14:49 — forked from dasniko/create_x509_certs.md
Creating self signed tls certificates with self-signed root CA
@concosminx
concosminx / install-java-Rocky.md
Last active June 6, 2022 10:03
Install Java on Rocky Linux

Install Java (Open JDK | Oracle) on Rocky Linux

  1. Install Open JDK using yum

sudo yum install java-17-openjdk java-17-openjdk-devel

  1. Install Oracle JDK
  • install wget | curl sudo dnf -y install wget curl

Becoming a Spring Certified Professional without the Core Spring Course

Until recently, the only way you could become a Certified Spring Professional was to take Pivotal’s compulsory, 4-day, Core Spring training course. On completion of the course, participants received an exam voucher that allowed them to schedule an exam at a certification centre.

At approximately £2.5k per attendee, the course is not cheap putting certification out of the reach of many self-funded developers and those that work for organisations without generous training budgets.

In May 2017 Pivotal changed their policy. Spring Certification Exams became available for individual purchase without enrolling in the course. I set out to see if it was possible to pass the exam without the Core Spring course and only using publically available material.

I set myself a budget of £250, ap

@concosminx
concosminx / GitDeleteCommands.ps1
Created November 22, 2021 18:50 — forked from cmatskas/GitDeleteCommands.ps1
Git Delete Branch commands
## Delete a remote branch
$ git push origin --delete <branch> # Git version 1.7.0 or newer
$ git push origin :<branch> # Git versions older than 1.7.0
## Delete a local branch
$ git branch --delete <branch>
$ git branch -d <branch> # Shorter version
$ git branch -D <branch> # Force delete un-merged branches
## Delete a local remote-tracking branch
@concosminx
concosminx / server.conf
Created October 8, 2021 09:59 — forked from timcheadle/server.conf
SSL nginx config example
server {
listen 80;
server_name www.example.com example.com;
# Redirect all traffic to SSL
rewrite ^ https://$server_name$request_uri? permanent;
}
server {
listen 443 ssl default_server;