Skip to content

Instantly share code, notes, and snippets.

View bapti's full-sized avatar

Neil Crawford bapti

  • Sketch
  • Scotland
View GitHub Profile
@bapti
bapti / git_clear_history.sh
Created April 13, 2022 17:04 — forked from stephenhardy/git-clearHistory
Steps to clear out the history of a git/github repository
-- Remove the history from
rm -rf .git
-- recreate the repos from the current content only
git init
git add .
git commit -m "Initial commit"
-- push to the github remote repos ensuring you overwrite history
git remote add origin git@github.com:<YOUR ACCOUNT>/<YOUR REPOS>.git
@bapti
bapti / dns-sync.sh
Created October 28, 2019 08:37 — forked from regisbsb/dns-sync.sh
Init.d script for keeping WSL resolv.conf in-sync with Windows
#! /bin/bash
### BEGIN INIT INFO
# Provides: dns-sync
# Required-Start:
# Required-Stop:
# Default-Start: S
# Default-Stop:
# Short-Description: Synchronizes /etc/resolv.conf in WLS with Windows DNS - Matthias Brooks
### END INIT INFO