Skip to content

Instantly share code, notes, and snippets.

View devansvd's full-sized avatar
🤗
Available

Devan devansvd

🤗
Available
View GitHub Profile
<!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;">
@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 |

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']

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 / 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 \
@devansvd
devansvd / My-Articles.md
Last active July 11, 2020 17:02
List of My Experiments
@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
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.