Skip to content

Instantly share code, notes, and snippets.

View arevindh's full-sized avatar
🤠
Focusing

itsmesid arevindh

🤠
Focusing
View GitHub Profile
@arevindh
arevindh / ubuntu-cloud.init.sh
Created April 14, 2024 16:11
Ubuntu cloudinit image generator proxmox
#!/bin/bash
##############################################################################
# things to double-check:
# 1. user directory
# 2. your SSH key location
# 3. which bridge you assign with the create line (currently set to vmbr100)
# 4. which storage is being utilized (script uses local-lvm)
##############################################################################
@arevindh
arevindh / telegram-frigate.yaml
Created January 6, 2024 13:29
Frigate - Telegram Notification
blueprint:
name: Frigate - Telegram Notification
description: Create automations to receive Snapshots and Clips from Frigate
domain: automation
input:
camera:
name: Frigate Camera
description: The name of the camera as defined in your frigate configuration (/conf.yml).
target_chat:
name: Target
@arevindh
arevindh / Proxmox-Cloudinit.sh
Created October 14, 2023 17:32 — forked from chris2k20/Proxmox-Cloudinit.sh
Proxmox Cloud-Init Template Creation Bash-Script (Ubuntu)
#!/bin/bash
# Creats a ubuntu Cloud-Init Ready VM Template in Proxmox
#
# https://gist.github.com/chris2k20/dba14515071bd5a14e48cf8b61f7d2e2
#
export IMAGENAME="focal-server-cloudimg-amd64.img"
export IMAGEURL="https://cloud-images.ubuntu.com/focal/current/"
@arevindh
arevindh / install-compose.sh
Created June 21, 2022 14:37
Install docker compose
#!/bin/bash
# Docker Compose
compose_release() {
curl --silent "https://api.github.com/repos/docker/compose/releases/latest" |
grep -Po '"tag_name": "\K.*?(?=")'
}
if ! [ -x "$(command -v docker-compose)" ]; then
curl -L https://github.com/docker/compose/releases/download/$(compose_release)/docker-compose-$(uname -s)-$(uname -m) \
@arevindh
arevindh / gist:0b602702c88cc75ce1699cb3392ac736
Created January 13, 2022 16:05
promox-vgpu-ubuntu20.04.md
args: -cpu 'host,+kvm_pv_unhalt,+kvm_pv_eoi,hv_vendor_id=NV43FIX,kvm=off'
cpu: host,hidden=1,flags=+pcid
hostpci0: 06:00,romfile=p400.bin
{
"info": {
"_postman_id": "32c262fa-7384-4477-a610-cde252c8829e",
"name": "Tinxy Open APIs",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "Device State",
"request": {
@arevindh
arevindh / mongo_prune_js.js
Created July 17, 2021 15:22
mongo_prune_js.js
// keep N-day worth of data
var days=7;
// change to false to have the script to really exclude old records
// from the database. While true, no change at all will be made to the DB
var dryrun=true;
var now = new Date().getTime(),
time_criteria = now ;
time_criteria_in_seconds = time_criteria / 1000;
// keep N-day worth of data
var days=7;
// change to false to have the script to really exclude old records
// from the database. While true, no change at all will be made to the DB
var dryrun=true;
var now = new Date().getTime(),
time_criteria = now ;
time_criteria_in_seconds = time_criteria / 1000;
@arevindh
arevindh / .htaccess
Last active February 21, 2020 10:16
.htaccess for react router
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.html$ - [L]
RewriteRule ^(Shibboleth.sso)($|/) - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule . /index.html [L]
@arevindh
arevindh / freenas_11_vm_not_booting_fix.txt
Created September 14, 2018 18:31
Freenas 11 VM not booting fix
#source https://www.reddit.com/r/freenas/comments/71no06/freenas_11_vm_not_booting/dncdmst/
On Ubuntu this worked for me too. If Grub is updated later you might have to copy it again.. Usually you can always manually boot from shell. Follow these steps:
When on UEFI Interactive Shell; type: exit
In the EFI menu system navigate to "Boot Maintenance Manager"
Select "Boot from file"