Skip to content

Instantly share code, notes, and snippets.

View akhiljalagam's full-sized avatar
🎯
Focusing

Akhil Jalagam akhiljalagam

🎯
Focusing
View GitHub Profile
@akhiljalagam
akhiljalagam / color_trace.sh
Last active July 4, 2023 11:25
Colored xtrace output
#!/bin/bash
SCRIPT="$1"
# Remove the script name from positional parameters
shift
echo "Arguments passed: $@"
echo "Total number of arguments: $#"
@akhiljalagam
akhiljalagam / install-arch.md
Created June 15, 2023 20:41 — forked from jqtrde/install-arch.md
Install Arch Linux with Full Disk Encryption (LVM on LUKS)
@akhiljalagam
akhiljalagam / restyling_template.user.js
Created January 6, 2023 16:16 — forked from Hunter-Github/restyling_template.user.js
A simple GreaseMonkey script template to implement a user-defined CSS without Stylish
// ==UserScript==
// @name Fix some style in GreaseMonkey
// @match *://example.com/*
// @copyright 2016+, You
// @grant GM_addStyle
// ==/UserScript==
GM_addStyle ( " \
// ADD YOUR CSS HERE
" );
@akhiljalagam
akhiljalagam / docker.sh
Created August 3, 2022 11:34 — forked from monkeym4ster/docker.sh
Docker: save/load container using tgz file (tar.gz)
#for not running docker, use save:
docker save <dockernameortag> | gzip > mycontainer.tgz
#for running or paused docker, use export:
docker export <dockernameortag> | gzip > mycontainer.tgz
#load
gunzip -c mycontainer.tgz | docker load
@akhiljalagam
akhiljalagam / README.md
Created February 8, 2022 09:50 — forked from etiennetremel/README.md
Simple Wireguard setup as VPN server and multiple clients

Simple WireGuard configuration

1 server, 2 clients

Getting started

Install Wireguard on all machines.

Generate all keys

Google Drive Sync Wine Scripting

This is a set of scripts that help running Google Drive Backup and Sync under Wine, with multiple Google accounts.

Each account is given its own Wine prefix (a separate wine configuration).

To install, run install-gdrive-sync google_account

List the accounts set up in ~/.config/gdrive-accounts

#
# Alive SSH Connections
#
SPACESHIP_SSH_SHOW="${SPACESHIP_SSH_SHOW=true}"
SPACESHIP_SSH_COLOR="${SPACESHIP_SSH_COLOR="yellow"}"
# ------------------------------------------------------------------------------
# Section
# ------------------------------------------------------------------------------
@akhiljalagam
akhiljalagam / letsencrypt-webroot-apache.md
Created December 8, 2020 05:27 — forked from daronco/letsencrypt-webroot-apache.md
Letsencrypt with webroot on Apache

Config Apache with /etc/apache2/conf-available/le.conf:

Alias /.well-known/acme-challenge/ "/var/www/html/.well-known/acme-challenge/"
<Directory "/var/www/html/">
    AllowOverride None
    Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
    Require method GET POST OPTIONS
</Directory>
@akhiljalagam
akhiljalagam / queueCounter.sh
Created November 26, 2020 03:16 — forked from agarzon/queueCounter.sh
alert based in mail queue size for postfix and plesk
#!/bin/sh
MAIL_BIN=`command -v mail`
QUEUE_SIZE=`/usr/sbin/postqueue -p | tail -n1 | awk '{print $5}'`
QUEUE_SUMMARY=`/usr/sbin/qshape -s deferred | head`
MAILTO="xxx@gmail.com"
LIMIT=100
function send_notification_mail() {
echo $QUEUE_SUMMARY | $MAIL_BIN -s "WARNING: mail queue critical on $HOSTNAME" $MAILTO