Skip to content

Instantly share code, notes, and snippets.

View cihadturhan's full-sized avatar
🐇
Ready!

Cihad Turhan cihadturhan

🐇
Ready!
View GitHub Profile
@AliBharwani
AliBharwani / URPPatchValidator.cs
Created April 2, 2026 15:50
Patch for analytic soft shadows asset in URP
// URPPatchValidator.cs
// Auto-patches URP's Lighting.hlsl to add global UASS (Analytic Soft Shadows) shadow receiving.
// Makes ALL Lit-based materials (including ShaderGraph Lit) receive UASS shadows without
// needing to swap to the standalone "Lit + AnalyticShadows" shader.
//
// Drop this in an Editor/ folder in your Unity project. It runs on every domain reload.
// Tested on Unity 6000.0.3 / URP 17.0.3 — anchor strings may need updating for other versions.
//
// Optional: Add this to your standalone "Lit + AnalyticShadows.shader" around its
// TEXTURE2D_X(_UASSTexture) declaration to avoid duplicate definition errors:
// Derived from Unity built-in shader source.
// https://raw.githubusercontent.com/chsxf/unity-built-in-shaders/0c7940740e75340009bbed453e2b198e294e4bab/Shaders/DefaultResourcesExtra/Skybox-Panoramic.shader
Shader "Skybox/Dual Panoramic" {
Properties{
_Tint1("Tint Color 1", Color) = (.5, .5, .5, .5)
_Tint2("Tint Color 2", Color) = (.5, .5, .5, .5)
[Gamma] _Exposure1("Exposure 1", Range(0, 8)) = 1.0
[Gamma] _Exposure2("Exposure 2", Range(0, 8)) = 1.0
_Rotation1("Rotation1", Range(0, 360)) = 0
@bozzin
bozzin / fake-3d-effect-with-depth-map.markdown
Created December 3, 2019 00:22
Fake 3D effect with depth map
@quaternioninterpolation
quaternioninterpolation / ImageDOCrossfade.cs
Last active August 26, 2026 15:59
DOTween UnityEngine.UI.Image image cross fade
/** --
** Copyright (C) 2019 by Josh van den Heever
**
** Permission is hereby granted, free of charge, to any person obtaining a copy of
** this software and associated documentation files (the "Software"), to deal in
** the Software without restriction, including without limitation the rights to
** use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
** of the Software, and to permit persons to whom the Software is furnished to
** do so, subject to the following conditions:
**
@swyxio
swyxio / Gatsby-bootstrap-lifecycle.md
Last active November 30, 2025 15:51
Gatsby bootstrap lifecycle

Sequence of Gatsby's bootstrap lifecycle with links to source code as of v2.0.0

  1. open and validate gatsby-config (get-config-file.js) 1.5 load themes (swyx added this note July 2019)
  2. load plugins (load-plugins/index.js) from the list given in gatsby-config.js
  3. onPreBootstrap: runs onPreBootstrap if it is implemented in any plugins, for example gatsby-plugin-typography. Receives handy [apiCallArgs](https://github.com/gatsbyjs/gatsby/blob/ffd8b2d691c9
import com.datatheorem.android.trustkit.TrustKit;
import com.datatheorem.android.trustkit.config.PublicKeyPin;
import javax.inject.Inject;
import okhttp3.CertificatePinner;
import okhttp3.OkHttpClient;
public class OkHttpCertPin {
private final TrustKit mTrustKit;
@chourobin
chourobin / 0-bridging-react-native-cheatsheet.md
Last active August 2, 2026 17:33
React Native Bridging Cheatsheet
@powhu
powhu / GIF2MP4.swift
Last active April 20, 2026 09:06
Swift 5.0 GIF to MP4
//
// GIF2MP4.swift
//
// Created by PowHu Yang on 2020/4/24.
// Copyright © 2020 PowHu Yang. All rights reserved.
//
/* How to use
let data = try! Data(contentsOf: Bundle.main.url(forResource: "gif", withExtension: "gif")!)
let tempUrl = URL(fileURLWithPath: NSTemporaryDirectory()).appendingPathComponent("temp.mp4")
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.EventSystems;
using System.Collections;
using System.Collections.Generic;
[RequireComponent(typeof(Image))]
[RequireComponent(typeof(Mask))]
[RequireComponent(typeof(ScrollRect))]
public class ScrollSnapRect : MonoBehaviour, IBeginDragHandler, IEndDragHandler, IDragHandler {
@v0lkan
v0lkan / engineer.md
Last active September 23, 2024 10:16
The Evolution of a Software Engineer

This gist outlines the change in the depth and breadth of the tasks and responsibilities of a software engineer as she continuously improves herself.

I created this to supplement a discussion in an internal slack group; then I though the rest of the world might benefit from this too.

Contributions are always welcome.

Junior Engineer

  • Knowledge