-
Grab ConfigGuard from this Gist.
# For deploying dotGuard curl -OJL 'https://gist.githubusercontent.com/dchakro/2bb714db3712f76610fe4f6ee2a82155/raw/deploy_Cerberus.sh' # For deploying etcGurad curl -OJL 'https://gist.githubusercontent.com/dchakro/2bb714db3712f76610fe4f6ee2a82155/raw/deploy_etcGuard.sh'
#!/usr/bin/env bash | |
# Define colors | |
RED='\033[91m' | |
RED_solid='\033[101m' | |
GREEN='\033[92m' | |
GREEN_solid='\033[42m' | |
CYAN='\033[96m' | |
NC='\033[0m' | |
BLUE_solid='\e[44m' |
#!/usr/bin/env sh | |
# This script requires ripgrep. https://github.com/BurntSushi/ripgrep | |
# The script should also work wit grep. | |
# Just find and replace 'rg' with 'grep' | |
RED='\033[91m' | |
GREEN='\033[32m' | |
YELLOW='\033[93m' | |
CYAN='\033[96m' |
# Modified from: https://gist.github.com/retrography/359e0cc56d2cf1acd161b5645bc801a8 | |
# The functions below use parallelized version of gzip called pigz | |
# to improve compression/decompression performance of RDS serialization in R. | |
# Each function searches for the appropriate program (based on the require | |
# compression format) and if found, offloads the compression handling to the | |
# external program and therefore leaves R free to do the data import/export. | |
# The functions have been only tested on macOS, but probably also work on other *nix systems |
The gists here contain bash scripts that install commands in /usr/local/bin
, you may need sudo
depending on your permissions.
The installed command usually chains together a series of commands to achieve desired results and requires only a few keysctrokes to invoke instead of typing a long string of parameters and pipes everytime.
- brewlog
brewlog
= run homebrew'sbrew
commands while saving thestdout
to a log file in your~/Logs/brew.log
- Not to be confused with
brew log
which shows the commit history (similar togit log
). - I need to find a new name, but for now as I personally don’t use
brew log
, I had no “merge conflicts” in my brain while assigningbrewlog
to achive my desired result of logging brew output :) [IMHObrew history
might have been a better name forbrew log
]
- Not to be confused with
## Mac OS is my favorite operating system but some of the bundled CLI tools are either outdated or slow to the new-age counterparts | |
# With the hardworks of people over at Homebrew, getting alternatives is a breeze. | |
## Here's how to do it: | |
# STEP-1 Install brew.sh | |
# Visit https://brew.sh | |
# STEP-2 Install brewlog (allow you to keep a log of brew activity, i.e. where the files are installed, what modifications [if any] were done) |
#!/bin/sh | |
# Extracting URLs from the exported HTML from getpocket.com/export | |
# In the following line $1 is the exported HTML from pocket | |
# which will be passed to this script as a CLI parameter | |
grep -Eoi '<a [^>]+>' $1 | grep -Eo 'href="[^\"]+"' | cut -d'=' -f 2 | tr -d '"' | tac > pocket2shiori.txt | |
# Reading the URLs one by one and adding to shiori | |
while IFS= read -r line; do | |
shiori add $line |
Cisco Anyconnect VPN is a popular enterprise VPN and is unfortunately the choice of my current workplace (instead of openVPN) 🤦♂️
This gist aims to alleviate these 3 issues I have Cisco's Anconnect Mobility client:
-
On my Mac machines, it has a significant overhead (as compared to the solution in this gist)
-
I ditched Anyconnect client wayback when I discovered that it installs and runs in the background as a daemon even if you exit the program. The battery takes a hit and it used to cause wakelocks on my macbook and cause the battery to die overnight, while my laptop was resting on the table with the lid closed.
These gist contains shell scripts to automate system sleep and wake on your machine running Debian linux (in my case DietPi).
until_tomorrow.sh
is a bash script using rtcwake
from the util-linux
package to make your (supported) system sleep "now" and wake-up at a specified time.
Run the following line:
curl -ssL 'https://gist.github.com/dchakro/571fe4d78219a9b4ff17690481c3afab/raw/add_cronjob.sh' | bash
So, it has been an interesting journey, but time to remove git-lfs. Here follows a summary of the approach I used to safely remove git-lfs,
git add --update; git commit -m “Commit before lfs removal”; git push
git checkout -b “remove-lfs”
- remove hooks
git lfs uninstall
- remove files enrolled in git-lfs from .gitattributes (open the file, delete the contents) [P.S. don’t delete the file!]
- list all lfs files,
git lfs ls-files
- run
git rm --cached
for each filegit lfs ls-files | cut -f 3 -d ' ' | xargs git rm --cached
- Untrack files (individually or pattern)
git lfs untrack '*.xz'