Skip to content

Instantly share code, notes, and snippets.

View shaunbharat's full-sized avatar

Shaun Bharat shaunbharat

  • Canada
  • 23:40 (UTC -04:00)
View GitHub Profile
@luismts
luismts / GitCommitBestPractices.md
Last active July 8, 2025 16:03
Git Tips and Git Commit Best Practices

Git Commit Best Practices

Basic Rules

Commit Related Changes

A commit should be a wrapper for related changes. For example, fixing two different bugs should produce two separate commits. Small commits make it easier for other developers to understand the changes and roll them back if something went wrong. With tools like the staging area and the ability to stage only parts of a file, Git makes it easy to create very granular commits.

Commit Often

Committing often keeps your commits small and, again, helps you commit only related changes. Moreover, it allows you to share your code more frequently with others. That way it‘s easier for everyone to integrate changes regularly and avoid having merge conflicts. Having large commits and sharing them infrequently, in contrast, makes it hard to solve conflicts.

@qoomon
qoomon / conventional-commits-cheatsheet.md
Last active July 14, 2025 20:15
Conventional Commits Cheatsheet
@NaniteFactory
NaniteFactory / lpcwstr.go
Last active September 21, 2023 00:12 — forked from icholy/lpcwstr.go
Convert the UTF16 Wide String (WSTR) from/to plain Go string.
package lpcwstr
// #include <windows.h>
// #include <wchar.h>
// #include <WinNT.h>
import "C"
import (
"unicode/utf16"
"unsafe"
@Lonami
Lonami / mc-ping.py
Last active June 24, 2024 17:35
Python Minecraft Server Pinger
import struct
import socket
import base64
import json
import sys
class Server:
def __init__(self, data):
self.description = data.get('description')
@gaearon
gaearon / modern_js.md
Last active April 14, 2025 19:22
Modern JavaScript in React Documentation

If you haven’t worked with JavaScript in the last few years, these three points should give you enough knowledge to feel comfortable reading the React documentation:

  • We define variables with let and const statements. For the purposes of the React documentation, you can consider them equivalent to var.
  • We use the class keyword to define JavaScript classes. There are two things worth remembering about them. Firstly, unlike with objects, you don't need to put commas between class method definitions. Secondly, unlike many other languages with classes, in JavaScript the value of this in a method [depends on how it is called](https://developer.mozilla.org/en-US/docs/Web/Jav
@mutin-sa
mutin-sa / Top_Public_Time_Servers.md
Last active July 2, 2025 20:56
List of Top Public Time Servers

Google Public NTP [AS15169]:

time.google.com

time1.google.com

time2.google.com

time3.google.com

@xoxefdp
xoxefdp / win10-remove-docker.ps1
Created February 28, 2018 11:04
How to completely remove docker on Windows 10
# https://success.docker.com/article/How_to_completely_remove_Docker_in_Windows_10
$ErrorActionPreference = "SilentlyContinue"
kill -force -processname 'Docker for Windows', com.docker.db, vpnkit, com.docker.proxy, com.docker.9pdb, moby-diag-dl, dockerd
try {
./MobyLinux.ps1 -Destroy
} Catch {}
@gornostal
gornostal / README.md
Last active July 6, 2025 04:10
Ulauncher Color Themes

This will be a temporary site for sharing Ulauncher color themes

When posting a theme make sure it has

  • title (theme name or whatever)
  • link to a gist or github repo with theme files
  • screenshot attached (just drag an image onto a comment area)

@ankanch
ankanch / getlocalIP.go
Created October 25, 2017 13:13
[Golang] Get Public IP address via Public IP API
package main
import (
"fmt"
"io/ioutil"
"net/http"
)
func main() {
url := "https://api.ipify.org?format=text" // we are using a pulib IP API, we're using ipify here, below are some others
// https://www.ipify.org
// http://myexternalip.com
@matthewzring
matthewzring / markdown-text-101.md
Last active July 14, 2025 18:28
A guide to Markdown on Discord.

Markdown Text 101

Want to inject some flavor into your everyday text chat? You're in luck! Discord uses Markdown, a simple plain text formatting system that'll help you make your sentences stand out. Here's how to do it! Just add a few characters before & after your desired text to change your text! I'll show you some examples...

What this guide covers: