Skip to content

Instantly share code, notes, and snippets.

View jasursadikov's full-sized avatar

Jasur Sadikov jasursadikov

View GitHub Profile
@jasursadikov
jasursadikov / git-change-username.sh
Last active September 27, 2023 11:48
Change authors e-mail and name
#!/bin/bash
git filter-branch --env-filter '
OLD_EMAIL="old@mail.com"
CORRECT_NAME="Correct Name"
CORRECT_EMAIL="correct@email.com"
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
then
export GIT_COMMITTER_NAME="$CORRECT_NAME"
export GIT_COMMITTER_EMAIL="$CORRECT_EMAIL"
fi
@jasursadikov
jasursadikov / git-clr.sh
Last active September 27, 2023 11:48
Removes all branches that do not exist on remote
#!/bin/bash
git fetch --prune
git branch | grep "feature\/\|bugfix\/" | while read -r p; do
echo "$p"
EXIST=$(git branch -r --contains "$p" | wc -l)
if [[ $EXIST == "0" ]]; then
git branch -D "$p"
fi
@jasursadikov
jasursadikov / Dome.cs
Created August 10, 2022 14:43
360 sphere generator for VR videos
using UnityEngine;
public sealed class Dome
{
private readonly Vector2Int size;
private readonly float fill;
public Dome(Vector2Int size, float fill)
{
this.size = size;
@jasursadikov
jasursadikov / Unlit_DissolveCutout.shader
Created July 31, 2021 10:53
Simple unlit burn effect unity shader
Shader "Unlit/Dissolve Cutout"
{
Properties
{
_Color ("Color", Color) = (1, 1, 1, 1)
_MainTex ("Base (RGB)", 2D) = "white" { }
_Dissolve ("Dissolve (A)", 2D) = "white" { }
_EdgeColor ("Edge Color", Color) = (1, 1, 1, 1)
_EdgeSize ("Edge Size", Range(0, 1)) = 0.5
}
@jasursadikov
jasursadikov / vscode-unity-settings.json
Last active October 17, 2023 10:32
VSCode files exclusion mask for Unity project
// This file should be placed in the root direcotry inside your Unity project directory like following /.vscode/settings.json
{
"files.exclude": {
// Root directory
"[Bb]uild/": true,
"[Bb]uilds/": true,
"[L]ibrary/": true,
"[Ll]ogs/": true,
"[Oo]bj/": true,
"[Tt]emp/": true,