Skip to content

Instantly share code, notes, and snippets.

@cvrajeesh
cvrajeesh / git-nav.sh
Created September 20, 2024 01:15
Bash script to navigate between commits in git repo
#!/bin/bash
GIT_NAV_DIR="${HOME}/.git-nav"
# Generate a file path to store commit history
# It use the MD5 hash of the Git root directory as the file name
generate_commit_file_path() {
if git rev-parse --show-toplevel > /dev/null 2>&1; then
git_root=$(git rev-parse --show-toplevel)
file_name=$(echo -n "$git_root" | md5 | awk '{print $1}')
mkdir -p ${GIT_NAV_DIR}
@cvrajeesh
cvrajeesh / cleanup-gitlab-pipelines.sh
Created August 29, 2022 18:55 — forked from chrishoerl/cleanup-gitlab-pipelines.sh
Bulk delete gitlab pipelines older than a given date
#!/bin/bash
# Purpose: Bulk-delete GitLab pipelines older than a given date
# Author: github.com/chrishoerl
# GitLab API: v4
# Requirements: jq must be instaled ($ sudo apt install jq)
# API example: https://gitlab.example.com/api/v4/projects
# API example: https://gitlab.example.com/api/v4/projects/<projectid>/pipelines
#
# NOTE: Script is just a dryrun. To really delete pipelines, simply uncomment line 49 to activate
#
@cvrajeesh
cvrajeesh / wget-jdk-oracle-install-example.txt
Created May 20, 2016 12:08 — forked from sr75/wget-jdk-oracle-install-example.txt
wget command to install Oracle JAVA JDK from stupid oracle website for centos and ubuntu
http://d.stavrovski.net/blog/post/how-to-install-and-setup-oracle-java-jdk-in-centos-6
# rpm
wget --no-cookies \
--no-check-certificate \
--header "Cookie: oraclelicense=accept-securebackup-cookie" \
"http://download.oracle.com/otn-pub/java/jdk/7u55-b13/jdk-7u55-linux-x64.rpm" \
-O jdk-7-linux-x64.rpm
# ubuntu
[user]
name = ***
email = ****
[core]
autocrlf = true
editor = 'C:/Program Files (x86)/Notepad++/notepad++.exe'\
-multiInst -notabbar -nosession -noPlugin
trustctime = false
[alias]
co = checkout

India Map Data