Skip to content

Instantly share code, notes, and snippets.

View dipeshhkc's full-sized avatar
🏠
Working from home

Dipesh KC dipeshhkc

🏠
Working from home
View GitHub Profile
@nikhita
nikhita / update-golang.md
Last active May 7, 2025 08:27
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:

@dipeshdulal
dipeshdulal / minimize.js
Created August 27, 2020 09:17
Minimize Number into K, M, G, T, P, E
var minimizeNumber = (num) => {
if(!Number.isFinite(num)) return "";
const minimizeMap = ["K", "M", "G", "T", "P", "E"];
if(num < 1000) return num.toString();
const exp = Math.floor(Math.log(num)/ Math.log(1000));
const minimized = Number((num / Math.pow(1000, exp)).toFixed(2));
return minimized+minimizeMap[exp-1];
}
@dipeshdulal
dipeshdulal / RepoAddInstructions.MD
Last active March 25, 2025 06:14
Get a list of created PR's today.

Instructions

  1. Go to github profile page.
  2. Click on today's or some days contribution
  3. Open Inspector Window
  4. Pase the following code
let rollupWrapper = document.querySelectorAll('.TimelineItem');
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
sshCommand = ssh -i ~/.ssh/denmark_rsa -F /dev/null
[user]
name = dipesh
email = [email protected]
[remote "origin"]