Skip to content

Instantly share code, notes, and snippets.

View besrabasant's full-sized avatar
🏠
Working from home

Basant Besra besrabasant

🏠
Working from home
View GitHub Profile
{
// Disable admin for test
"admin": {
"disabled": true
},
"apps": {
"http": {
// Use http to avoid having to provision an ssl cert
"http_port": 4444,
"servers": {
@besrabasant
besrabasant / monaco-editor.vue
Created June 6, 2024 02:35
Monaco Editor Component in Vue3
<script lang="ts" setup>
import * as monaco from 'monaco-editor/esm/vs/editor/editor.api';
import { computed, toRefs } from 'vue';
// Define an interface for the props
interface Props {
diffEditor?: boolean;
width?: string | number;
height?: string | number;
original?: string;
@besrabasant
besrabasant / ssh-certificate-authentication.md
Created March 17, 2024 11:39 — forked from allthingsclowd/ssh-certificate-authentication.md
How to configure SSH Certificate based Authentication - Great for large scale deployment and management of servers

SSH Certificate based Authentication - Quick Guide

Certificate Authority (CA) Server Host Server(s) Client(s)
Host Server Certificate Configuration
This is the server typically managed by a security team. The root CA private keys are held on this server and should be protected. If these keys are compromised it will be necessary to Revoke & Rotate/Recreate ALL Certificates!! These are the servers that are being built or reprovisioned. The Host CA Signed Certificate is used to prove Host Authenticity to clients. It is sent to the ssh client during the initial handshake when a ssh client attempts to login. The user laptop or server that's runing the ssh client. The Client CA Signed Certificate is used to prove Client Authenticity to the Host Server
Step 1. Create HOST CA signing keys : Example ssh-keygen -t rsa -N '' -C HOST-CA -b 4096 -f host-ca Step 2. Let's generate a fresh set of ssh RSA HOST keys with 4096 bits. Typically the keys are generated by default
@besrabasant
besrabasant / rafQueue.js
Created July 19, 2023 04:57
Utility script for queuing promises
/**
* requestAnimationFrame polyfill from Paul Irish
* http://paulirish.com/2011/requestanimationframe-for-smart-animating/
* MIT license
*/
var lastTime = 0,
vendors = ["ms", "moz", "webkit", "o"]
for (var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {
window.requestAnimationFrame = window[vendors[x] + "RequestAnimationFrame"]
@besrabasant
besrabasant / ReadMe.md
Created June 18, 2022 17:41
Asus M16 - Arch Linux / Manjaro - Configure System Keys Properly
@besrabasant
besrabasant / ReadMe.md
Created June 15, 2022 18:32
Bluetooth Volume too low (only in Arch Linux / Manjaro)
@besrabasant
besrabasant / readme.md
Created June 14, 2022 14:45
ASUS Rog M16 - Arch Linux - Control Blutooth audio
@besrabasant
besrabasant / docker-aliases.sh
Created September 4, 2021 10:02 — forked from jgrodziski/docker-aliases.sh
Useful Docker Aliases
############################################################################
# #
# ------- Useful Docker Aliases -------- #
# #
# # Installation : #
# copy/paste these lines into your .bashrc or .zshrc file or just #
# type the following in your current shell to try it out: #
# wget -O - https://gist.githubusercontent.com/jgrodziski/9ed4a17709baad10dbcd4530b60dfcbb/raw/d84ef1741c59e7ab07fb055a70df1830584c6c18/docker-aliases.sh | bash
# #
# # Usage: #
@besrabasant
besrabasant / readme.md
Last active June 8, 2020 05:13
Download Docker Images without Docker Pull
@besrabasant
besrabasant / about.md
Last active March 3, 2023 06:48
Submitting Forms with Turbolinks ( tested with Laravel );