Skip to content

Instantly share code, notes, and snippets.

View Sugavanas's full-sized avatar

Sugavanas Sugavanas

View GitHub Profile
@Sugavanas
Sugavanas / git.resign.sh
Created November 13, 2021 23:45
Git Alias Resign: Sign Old Commits and Keep commit date same as author date using rebase
echo "Don't execute this script directly. Edit it and copy the command you need.";
exit;
# Make sure you backup your .git folder (better the entire repository) before running this!
# USE AT YOUR OWN RISK!
# Tested with git version 2.33.1
# If on ubuntu, make sure to add the official repo from git to get the latest version.
# This will add a git alias
# Usage: git resign HASH
@Sugavanas
Sugavanas / docker-change-root-dir.sh
Last active November 13, 2021 00:08
Change Docker Root Dir Path in Linux
#!/bin/bash
CURRENTDOCKERROOTDIR=/var/lib/docker
NEWDOCKERROOTDIR=
COPYFOLDER=false
DONTSTARTDOCKERAFTERCHANGE=false
FORCEOVERWRITE=false
JSONDAEMONFILEPATH=/etc/docker/daemon.json
STORAGEDRIVER=
@Sugavanas
Sugavanas / InfoDialog.vue
Last active May 11, 2021 01:52
Vue3 Modal Componenet
<template>
<Modal :dismissible="true" v-model:open="show">
<div class="p-4">
<h3 class="text-lg font-medium leading-6 text-gray-900">
{{ title }}
</h3>
<div class="mt-2">
<p class="text-sm text-gray-500">
{{ description }}
</p>
@Sugavanas
Sugavanas / revert-floating-ip-gateway.sh
Last active February 10, 2022 09:09 — forked from sparkcodeuk/floating-ip-gateway.sh
Digital Ocean floating IP gateway script (force droplet to use the assigned floating IP for outbound traffic as well as inbound traffic). This forked script will revert back to original settings. Pass the original IP address of the droplet as the first parameter.
#!/bin/bash
# Revert outbound traffic back to original ip. Call script with the original ip address of droplet
NET_INT="eth0"
CURL_TIMEOUT=3
if [ "$1" == "" ]; then
echo "Original IP of droplet not given."
exit 1
fi