Skip to content

Instantly share code, notes, and snippets.

View akhiljalagam's full-sized avatar

Akhil Jalagam akhiljalagam

View GitHub Profile
akhiljalagam /
Last active July 4, 2023 11:25
Colored xtrace output
# Remove the script name from positional parameters
echo "Arguments passed: $@"
echo "Total number of arguments: $#"
akhiljalagam /
Created June 15, 2023 20:41 — forked from jqtrde/
Install Arch Linux with Full Disk Encryption (LVM on LUKS)
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 *://*
// @copyright 2016+, You
// @grant GM_addStyle
// ==/UserScript==
GM_addStyle ( " \
" );
akhiljalagam /
Created August 3, 2022 11:34 — forked from monkeym4ster/
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
gunzip -c mycontainer.tgz | docker load
akhiljalagam /
Created February 8, 2022 09:50 — forked from etiennetremel/
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
# ------------------------------------------------------------------------------
# Section
# ------------------------------------------------------------------------------
akhiljalagam /
Created December 8, 2020 05:27 — forked from daronco/
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
akhiljalagam /
Created November 26, 2020 03:16 — forked from agarzon/
alert based in mail queue size for postfix and plesk
MAIL_BIN=`command -v mail`
QUEUE_SIZE=`/usr/sbin/postqueue -p | tail -n1 | awk '{print $5}'`
QUEUE_SUMMARY=`/usr/sbin/qshape -s deferred | head`
function send_notification_mail() {
echo $QUEUE_SUMMARY | $MAIL_BIN -s "WARNING: mail queue critical on $HOSTNAME" $MAILTO