Skip to content

Instantly share code, notes, and snippets.

View HariSekhon's full-sized avatar
🏠
100% Remote - Digital Nomad

Hari Sekhon HariSekhon

🏠
100% Remote - Digital Nomad
View GitHub Profile
@HariSekhon
HariSekhon / git-io-custom-url.md
Created August 13, 2020 15:10 — forked from dikiaap/git-io-custom-url.md
git.io custom URL

Command:

curl https://git.io/ -i -F "url=https://github.com/YOUR_GITHUB_URL" -F "code=YOUR_CUSTOM_NAME"

URLs that can be created is from:

  • https://github.com/*
  • https://*.github.com
  • https://*.github.com/*
  • https://*.github.io
@HariSekhon
HariSekhon / git-io-custom-url.md
Created August 13, 2020 15:10 — forked from dikiaap/git-io-custom-url.md
git.io custom URL

Command:

curl https://git.io/ -i -F "url=https://github.com/YOUR_GITHUB_URL" -F "code=YOUR_CUSTOM_NAME"

URLs that can be created is from:

  • https://github.com/*
  • https://*.github.com
  • https://*.github.com/*
  • https://*.github.io
@HariSekhon
HariSekhon / osx_defaults.sh
Created September 29, 2020 16:18 — forked from vraravam/osx-defaults.sh
OSX Defaults to setup a brand new machine
#!/usr/bin/env bash
# TODO: Need to figure out the settings for the following:
# 1) Dock: Items with order (not capturing binary data - since that is dependent on installed apps)
# 2) Security & Privacy Preferences: Full Disk Access, Camera, Microphone
# 3) Login items for my user (i.e. apps started when I login)
# 4) Retina displays
##
# This is a script with useful tips taken from:
@HariSekhon
HariSekhon / gist:a3bdfd44268cb80dc1b725219f7cc9f5
Last active May 19, 2022 10:49
Terraform GitHub Rate Limit hit, hanging for impractically long periods of time
2022-05-18T19:06:46.951+0100 [DEBUG] provider.terraform-provider-github_v4.20.0: 2022/05/18 19:06:46 [DEBUG] Rate limit 60 reached, sleeping for 9m32.048878s (until 2022-05-18 19:16:19.000001 +0100 BST m=+572.590692663) before retrying
...
# Another run today:
...
2022-05-19T10:40:44.995+0100 [DEBUG] provider.terraform-provider-github_v4.20.0: 2022/05/19 10:40:44 [DEBUG] Rate limit 60 reached, sleeping for 59m42.004336s (until 2022-05-19 11:40:27.000001 +0100 BST m=+3599.364499530) before retrying
...
│ Error: "invitation_id": required field is not set
│ with module.repo-myrepo.github_user_invitation_accepter.nugen-ci,
│ on ../modules/github_repo/collaborators.tf line 12, in resource "github_user_invitation_accepter" "my-ci":
│ 12: resource "github_user_invitation_accepter" "my-ci" {
@HariSekhon
HariSekhon / _Jenkins+Script+Console.md
Created July 3, 2022 08:19 — forked from dnozay/_Jenkins+Script+Console.md
jenkins groovy scripts collection.
@HariSekhon
HariSekhon / gist:3b2e2de7327d42e7e7a4442f3b51488b
Created May 18, 2023 20:57
Get all Kubernetes pods and IPs
kubectl get pods -o json --all-namespaces | jq -r '.items[] | [.metadata.namespace, .metadata.name, .status.podIP] | @csv'
@HariSekhon
HariSekhon / clean_code.md
Created March 20, 2024 23:50 — forked from wojteklu/clean_code.md
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@HariSekhon
HariSekhon / mac.md
Last active May 15, 2024 20:29
mac.md from HariSekhon/Knowledge-Base repo: https://github.com/HariSekhon/Knowlege-Base

Mac

The best laptop money can buy:

https://www.apple.com/uk/macbook-pro/

If you don't have an M3 Pro / Max - you're missing out on an excellent (but overpriced) machine.

Homebrew - Package Management