Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View devansvd's full-sized avatar
🤗
Available

Devan devansvd

🤗
Available
View GitHub Profile
Self Evaluation:
- Interested in improving in software field ?
- What you consider your areas of strength in coding.
- What parts you feel need to improve.
- Which areas you want to focus on ? list detailed specifics.
@devansvd
devansvd / complete-pipeline.yml
Last active January 8, 2021 12:23
gitlab ci docker build and push to private docker registry pipeline
# Ci pipeline to buid docker images
# and push to gitlab docker registry
# auto deploy as well
stages:
- build
docker-build-master:
image: docker:latest
stage: build

Command to list

import os; [(os.path.dirname(file)[len('Packages/'):], sublime.decode_value(sublime.load_resource(file))['url']) for file in sublime.find_resources('package-metadata.json')]

import os; [(os.path.dirname(file)[len('Packages/'):]) for file in sublime.find_resources('package-metadata.json')]

Plugins Installed

['AutoFileName', 'AutoPEP8', 'BracketHighlighter', 'Dockerfile Syntax Highlighting', 'EditorConfig', 'Emmet', 'Generic Config', 'HTML5', 'MarkdownPreview', 'Night Owl', 'Package Control', 'Python 3', 'Sass', 'SideBarEnhancements', 'TOML', 'Vue Syntax Highlight', 'HTML-CSS-JS Prettify', 'JsPrettier', 'TypeScript']
@devansvd
devansvd / My-Articles.md
Last active July 11, 2020 17:02
List of My Experiments
@devansvd
devansvd / open-id-proxy.md
Created June 26, 2020 09:23
Protect open backends with Openid/oauth with louketo-openid-proxy

Protect open backends with Openid/oauth with louketo-openid-proxy

louketo-openid-proxy - https://github.com/louketo/louketo-proxy

Looks like client-id in the token aud is mandatory.

To add Keycloakadmin -> Client -> Mappers -> Create -> mapper type audience -> select client id

docker run --name louketo-openid-proxy -it -d \
 -p 8440:8440 quay.io/louketo/louketo-proxy \

Basic docker alpine setup

FROM node:12.18.0-alpine3.9

WORKDIR /usr/src/app

COPY . .

RUN apk --no-cache --virtual build-dependencies add \
 python \
@devansvd
devansvd / Vscode-Formatter-setup.md
Last active June 9, 2020 12:19
My standard prettier formatter configuration

Auto format staged files before commit, Prettier is the best formatter available now, but it formats html ugly. Using beautify to formatter only html, others prettier will handle

Note: use common print width 100 for both beautify and prettier

Install devDependencies

npm i -D husky prettier js-beautify lint-staged
{"lastUpload":"2020-06-09T12:06:09.644Z","extensionVersion":"v3.4.3"}
@devansvd
devansvd / AesUtil.js
Created June 1, 2020 11:17 — forked from AndiDittrich/AesUtil.js
Node.js - AES Encryption/Decryption with AES-256-GCM using random Initialization Vector + Salt
// AES Encryption/Decryption with AES-256-GCM using random Initialization Vector + Salt
// ----------------------------------------------------------------------------------------
// the encrypted datablock is base64 encoded for easy data exchange.
// if you have the option to store data binary save consider to remove the encoding to reduce storage size
// ----------------------------------------------------------------------------------------
// format of encrypted data - used by this example. not an official format
//
// +--------------------+-----------------------+----------------+----------------+
// | SALT | Initialization Vector | Auth Tag | Payload |
// | Used to derive key | AES GCM XOR Init | Data Integrity | Encrypted Data |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Dom</title>
</head>
<body style="text-align: center;">