Skip to content

Instantly share code, notes, and snippets.

Avatar
🤗
Available

Devan devansvd

🤗
Available
View GitHub Profile
View stuff.txt
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 Jan 8, 2021
gitlab ci docker build and push to private docker registry pipeline
View complete-pipeline.yml
# 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
@devansvd
devansvd / My-Articles.md
Last active Jul 11, 2020
List of My Experiments
View My-Articles.md
@devansvd
devansvd / open-id-proxy.md
Created Jun 26, 2020
Protect open backends with Openid/oauth with louketo-openid-proxy
View open-id-proxy.md

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 \
View Dockerfile.md

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 \
View Sublime-Plugins.md

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 / AesUtil.js
Created Jun 1, 2020 — forked from AndiDittrich/AesUtil.js
Node.js - AES Encryption/Decryption with AES-256-GCM using random Initialization Vector + Salt
View AesUtil.js
// 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 |
View shadow-dom.html
<!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;">
View cloudSettings
{"lastUpload":"2020-06-09T12:06:09.644Z","extensionVersion":"v3.4.3"}
@devansvd
devansvd / Vscode-Formatter-setup.md
Last active Jun 9, 2020
My standard prettier formatter configuration
View Vscode-Formatter-setup.md

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