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 December 18, 2022 10:48
Bash heaven
# Add `~/bin` to the `$PATH`
# 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.
for file in ~/.{path,bash_prompt,exports,aliases,functions,extra}; do
[ -r "$file" ] && [ -f "$file" ] && source "$file";
done;
unset file;
# Case-insensitive globbing (used in pathname expansion)
@nikhita
nikhita / update-golang.md
Last active June 17, 2024 16:29
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;