Skip to content

Instantly share code, notes, and snippets.

View YashishDua's full-sized avatar

Yashish Dua YashishDua

View GitHub Profile
@kunagpal
kunagpal / .bash_profile
Last active September 26, 2024 08:04
Bash heaven
# Add `~/bin` to the `$PATH`
export BUN_INSTALL="$HOME/.bun";
export PATH="$HOME/bin:$BUN_INSTALL/bin:$PATH:$HOME/go/bin";
# Set PATH, MANPATH, etc., for Homebrew.
eval "$(/opt/homebrew/bin/brew shellenv)";
# Load the shell dotfiles, and then some:
# * ~/.path can be used to extend `$PATH`.
# * ~/.extra can be used for other settings you don’t want to commit.
@nikhita
nikhita / update-golang.md
Last active November 15, 2024 08:50
How to update the Go version

How to update the Go version

System: Debian/Ubuntu/Fedora. Might work for others as well.

1. Uninstall the exisiting version

As mentioned here, to update a go version you will first need to uninstall the original version.

To uninstall, delete the /usr/local/go directory by:

@mtsahakis
mtsahakis / PermissionUtils.java
Last active January 6, 2024 09:16
Android Permission Utility class. A collection of static convenience methods for checking if Android Runtime permissions are required.
import android.app.Activity;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.net.Uri;
import android.os.Build;
import android.preference.PreferenceManager;
import android.provider.Settings;
import android.support.v4.app.Fragment;
import java.util.List;