Skip to content

Instantly share code, notes, and snippets.

View Sandip124's full-sized avatar
💬
Thinking

Sandip Chaudhary Sandip124

💬
Thinking
View GitHub Profile
@Sandip124
Sandip124 / software-install.ps1
Last active August 15, 2024 06:41
initial software install
Set-ExecutionPolicy RemoteSigned
choco install git -y
choco install postgresql
choco install nvm -y
choco install figma -y
@Sandip124
Sandip124 / .bashrc
Created October 23, 2022 12:45
bashrc file to show git info on cmd
#My aliases
alias gs='git status -sb'
alias gaa='git add --all'
alias gc='git commit -m $2'
alias gp='git push'
alias gpo='git push origin'
alias gpl='git pull'
alias gl="git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
alias ls='ls -F --color=auto --show-control-chars'
@Sandip124
Sandip124 / lightmode.cs
Created May 25, 2022 13:53
extension method to know windows has light mode or not.
/// <summary>
/// Determine whether it is a light theme
/// </summary>
/// <returns></returns>
/// <exception cref="InvalidOperationException"></exception>
public static bool IsLightTheme()
{
using (var personalizeKey =
Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Themes\Personalize",
false))
@Sandip124
Sandip124 / GraphicExtension.cs
Created April 23, 2022 15:43
graphic extension
public static class GraphicsExtension
{
private static GraphicsPath GenerateRoundedRectangle(
this Graphics graphics,
RectangleF rectangle,
float radius)
{
float diameter;
GraphicsPath path = new GraphicsPath();
if (radius <= 0.0F)
https://drive.google.com/drive/folders/1H_pSvuuaHlfHedAWQBz5ey1Pz92v5GGy?usp=sharing
@Sandip124
Sandip124 / sqlSplitter.cs
Created February 14, 2022 04:53
Sql Splitter
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
namespace SchemaSplitter
{
@Sandip124
Sandip124 / numberValidator.js
Created January 1, 2022 07:49
A simple number validator function in JS to validate numeric inputs
function validateNumericBox(elm){
$(elm).on('keyup', (e)=>{
e.preventDefault()
let rate = $(elm).val()
if(!isNormalInteger(rate)){
$(elm).val(0);
}else{
$(elm).val(rate.replace(/^0+/, ""));
}
});
@Sandip124
Sandip124 / bump-version.sh
Created December 21, 2021 05:04 — forked from jv-k/bump-version.sh
This script automates bumping the git software project's version using automation. ***Please see https://github.com/jv-k/bump-version for an updated that module you can use with your projects.
#!/bin/bash
#
# █▄▄ █░█ █▀▄▀█ █▀█ ▄▄ █░█ █▀▀ █▀█ █▀ █ █▀█ █▄░█
# █▄█ █▄█ █░▀░█ █▀▀ ░░ ▀▄▀ ██▄ █▀▄ ▄█ █ █▄█ █░▀█
#
# Description:
# - This script automates bumping the git software project's version using automation.
# - It does several things that are typically required for releasing a Git repository, like git tagging,
# automatic updating of CHANGELOG.md, and incrementing the version number in various JSON files.
@Sandip124
Sandip124 / bump-version.sh
Created December 21, 2021 05:04 — forked from mareksuscak/bump-version.sh
Bump version shell script.
#!/bin/bash
# Thanks goes to @pete-otaqui for the initial gist:
# https://gist.github.com/pete-otaqui/4188238
#
# Original version modified by Marek Suscak
#
# works with a file called VERSION in the current directory,
# the contents of which should be a semantic version number
# such as "1.2.3" or even "1.2.3-beta+001.ab"