Skip to content

Instantly share code, notes, and snippets.

View mubeeniqbal's full-sized avatar
💯
I must warn you against over-engineering. Most developers suffer from it.

Mubeen Iqbal mubeeniqbal

💯
I must warn you against over-engineering. Most developers suffer from it.
View GitHub Profile
#
# Snap is a utility to create system snapshots for btrfs subvolumes.
#
# @author Mubeen Iqbal
# @date 2014-11-26
# @license GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
#
#!/bin/sh
@mubeeniqbal
mubeeniqbal / snp
Last active June 8, 2021 14:43 — forked from cmlsharp/snp
Runs a command wrapped with snapper pre-post snapshots for btrfs subvolumes. File path: /usr/local/bin
#!/usr/bin/env bash
#
# Runs a command wrapped with snapper pre-post snapshots for btrfs subvolumes.
# Usage: snp [-c config1,config2,...] <command>
# Constants
readonly LOG_PATH='/var/local/log/snp'
readonly DATE="$(date +'%Y-%m-%d-%H%M%S')"
readonly LOG_FILE="${LOG_PATH}/snp-${DATE}.log"
#! /usr/bin/env bash
#
# Written by: crossroads1112
# Purpose: This script is complimentary to the snp script. It makes the process rolling back upgrades and daily snapshots easier
#
#
#
################################
log_path="/var/local/log/rollback"
date=$(date "+%Y-%m-%d-%H%M%S")
@mubeeniqbal
mubeeniqbal / conky-i3bar
Last active August 29, 2015 14:10
Wrapper script for Conky to run with i3bar.
#!/usr/bin/env bash
#
# Wrapper script for Conky to run with i3bar.
# Send the header so that i3bar knows we want to use JSON.
echo '{"version":1}'
# Begin an endless array.
echo '['
@mubeeniqbal
mubeeniqbal / conkyrc
Last active August 29, 2015 14:10
Config file for Conky.
out_to_x no
own_window no
out_to_console yes
background no
max_text_width 0
# Keep digits at their constant positions.
pad_percents 3
# Update interval (seconds)
@mubeeniqbal
mubeeniqbal / i3config
Last active August 29, 2015 14:10
Config file for i3 window manager.
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
@mubeeniqbal
mubeeniqbal / i3exit
Last active August 29, 2015 14:10
Runs exiting commands (e.g. shutdown, lock, reboot, etc.) for i3 window manager using polkit.
#!/usr/bin/env bash
#
# Runs exiting commands (e.g. shutdown, lock, reboot, etc.) for i3 window
# manager using polkit.
# This script is intended to be used with i3wm hotkey combinations.
# Usage: i3exit {lock|logout|suspend|hibernate|reboot|shutdown}
#######################################
# Lock screen in i3wm.
# Globals:
@mubeeniqbal
mubeeniqbal / i3status.conf
Last active April 23, 2024 11:39
Config file for i3status.
# i3status configuration file.
# see "man i3status" for documentation.
# It is important that this file is edited as UTF-8.
# The following line should contain a sharp s:
# ß
# If the above line is not correctly displayed, fix your editor first!
general {
output_format = "i3bar"
@mubeeniqbal
mubeeniqbal / update-files
Last active August 29, 2015 14:10
Update files at correct paths in the system.
#!/usr/bin/env bash
#
# Update files at correct paths in the system.
# Edit the paths for your system before using the script.
# Reset prompt colors
readonly COLOR_OFF='\e[0m'
# Regular prompt colors
readonly RED='\e[0;31m'
@mubeeniqbal
mubeeniqbal / clone-git-repos
Last active August 29, 2015 14:10
Clone all listed git repositories.
#!/usr/bin/env bash
#
# Clone all listed git repositories.
# Add/edit repo URLs to clone. Comment those you don't want to.
# Make sure you are inside the directory where you want to clone the git
# repositories before you run this script.
#
# Respective cloned folders are named after the keys in the array.
# Git repos array.