Skip to content

Instantly share code, notes, and snippets.

View lvnilesh's full-sized avatar
💭
🏆 Vibranium Status Level

LV Nilesh lvnilesh

💭
🏆 Vibranium Status Level
View GitHub Profile
@lvnilesh
lvnilesh / autoscaling.json
Created June 20, 2024 03:38
autoscaling cloudformation JSON
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "Create a multi-az, load balanced and Auto Scaled sample web site running on\nan Apache Web Server. The application is configured to span all\nAvailability Zones in the region and is Auto-Scaled based on the CPU\nutilization of the web servers. Notifications will be sent to the operator\nemail address on scaling events. The instances are load balanced with a\nsimple health check against the default web page. **WARNING** This template\ncreates one or more Amazon EC2 instances and an Elastic Load Balancer. You\nwill be billed for the AWS resources used if you create a stack from this\ntemplate.\n",
"Parameters": {
"InstanceType": {
"Description": "WebServer EC2 instance type",
"Type": "String",
"Default": "t4g.micro"
},
"OperatorEMail": {
@lvnilesh
lvnilesh / autoscaling.yaml
Created June 20, 2024 03:37
autoscaling cloudformation YAML
AWSTemplateFormatVersion: "2010-09-09"
Description: |
Create a multi-az, load balanced and Auto Scaled sample web site running on
an Apache Web Server. The application is configured to span all
Availability Zones in the region and is Auto-Scaled based on the CPU
utilization of the web servers. Notifications will be sent to the operator
email address on scaling events. The instances are load balanced with a
simple health check against the default web page. **WARNING** This template
creates one or more Amazon EC2 instances and an Elastic Load Balancer. You
@lvnilesh
lvnilesh / docker-compose.yaml
Created April 28, 2024 02:20
self-hosted network-isolated vaultwarden
---
services:
bitwarden:
container_name: vault
hostname: vault
image: vaultwarden/server:1.30.5-alpine
restart: always
volumes:
- /etc/localtime:/etc/localtime:ro
- $PWD/log:/var/log/vaultwarden
@lvnilesh
lvnilesh / kamal.md
Created April 19, 2024 04:14 — forked from pythoninthegrass/kamal.md
kamal - the missing manual

kamal

This documentation adds important additions to the docs for kamal deploy tool (see github.com/basecamp/kamal)

Destination flag

You can use kamal deploy --destination staging

This will read config/deploy.yml and config/deploy.staging.yml files, and also will read .env.staging file if it exists.

@lvnilesh
lvnilesh / wp-config.php
Created February 28, 2024 18:13
wp-config.php modified to use behind a reverse proxy
<?php
/**
* The base configuration for WordPress
*
* The wp-config.php creation script uses this file during the installation.
* You don't have to use the web site, you can copy this file to "wp-config.php"
* and fill in the values.
*
* This file contains the following configurations:
*
@lvnilesh
lvnilesh / 3-docker-compose.cloudflared.yaml
Created February 15, 2024 18:00
3-docker-compose.cloudflared.yaml
version: "3.9"
services:
cloudflared:
container_name: foobar
image: ghcr.io/erisa/cloudflared:2024.2.0
command: tunnel --no-autoupdate run foobar
restart: always
environment:
READ_IP_HEADER: Cf-Connecting-Ip
@lvnilesh
lvnilesh / backup-restore.md
Last active February 15, 2024 17:57
backup restore
docker-compose.yaml			/root/dockerfiles/step-by-step/3-docker-compose-cloudflared.yaml


A		$PWD/cloudflared	/root/dockerfiles/step-by-step/cloudflared.tar.gz

cd $PWD # also known as step-by-step folder
tar -czf cloudflared.tar.gz cloudflared/

B		/var/www/html/		/root/dockerfiles/step-by-step/wpbackup/wp_today.tar.gz
@lvnilesh
lvnilesh / .aerospace.toml
Created February 13, 2024 21:02 — forked from carlosflorencio/.aerospace.toml
.aerospace.toml
start-at-login = true
accordion-padding = 0
gaps.inner.horizontal = 10
gaps.inner.vertical = 10
after-startup-command = [
'workspace 1', 'layout h_accordion horizontal',
'workspace 2', 'layout h_accordion horizontal',
]
@lvnilesh
lvnilesh / install_gpu_ubuntu_2204.sh
Created January 29, 2024 05:55 — forked from ovrnt/install_gpu_ubuntu_2204.sh
Yam Peleg's Ubuntu 22.04 “CUDA + GPU Drivers + CuDNN and everything else” installer (https://twitter.com/Yampeleg/status/1751823896800583924)
#!/bin/bash
# Verify if GPU is CUDA-enabled
lspci | grep -i nvidia
# Remove previous NVIDIA driver installation
sudo apt-get purge nvidia* -y
sudo apt remove nvidia-* -y
sudo rm /etc/apt/sources.list.d/cuda* -y
sudo apt-get autoremove && sudo apt-get autoclean -y
version: '3.7'
# Settings and configurations that are common for all containers
x-minio-common: &minio-common
image: quay.io/minio/minio:${RELEASE}
command: server http://site1-minio{1...4}/data{1...2}
environment:
- MINIO_PROMETHEUS_AUTH_TYPE=public
- CI=true