Skip to content

Instantly share code, notes, and snippets.

View bryankimani's full-sized avatar

Bryan Kimani bryankimani

View GitHub Profile
@bryankimani
bryankimani / custom_open_git_repo_url.sh
Last active April 29, 2023 19:04
This shell function streamlines the process of visiting repository URLs for faster navigation.
# This shell function streamlines the process of visiting repository URLs for faster navigation.
# With a simple command, "openrepo", you can easily visit the repository URL associated with the current folder you're in.
# This is particularly useful when you need to quickly access the repository of the project you're working on, without
# having to navigate to the URL manually. By executing the "openrepo" command from the command line, the script will
# automatically open the associated repository URL in your default browser. This saves time and eliminates the need for
# manual navigation, making it an ideal solution for developers and anyone else who regularly interacts with repositories.
openrepo() {
regex='^(https?|ftp|file)://[-A-Za-z0-9\+&@#/%?=~_|!:,.;]*[-A-Za-z0-9\+&@#/%=~_|]\.[-A-Za-z0-9\+&@#/%?=~_|!:,.;]*[-A-Za-z0-9\+&@#/%=~_|]$'
remote_url=$(git remote get-url origin)
@bryankimani
bryankimani / install_terraform_ubuntu_22-04.txt
Created November 10, 2022 11:42
Install Terraform on Linux Ubuntu 22.04
# Ensure that your system is up to date, and you have the gnupg, software-properties-common, and curl packages installed.
sudo apt-get update && sudo apt-get install -y gnupg software-properties-common
# Install the HashiCorp GPG key.
wget -O- https://apt.releases.hashicorp.com/gpg | \
gpg --dearmor | \
sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg
# Verify the key's fingerprint.
gpg --no-default-keyring \
@bryankimani
bryankimani / tabbed_taxonomy.php
Created November 19, 2015 08:12 — forked from FernE97/tabbed_taxonomy.php
PHP: WordPress custom taxonomy/post query
<?php
$args = array(
'orderby' => 'ID'
);
$terms = get_terms( 'testimonial_category', $args );
?>
<!-- bootstrap tabs -->
<ul class="nav-tabs">
<?php