Skip to content

Instantly share code, notes, and snippets.

View cihadturhan's full-sized avatar
🐇
Ready!

Cihad Turhan cihadturhan

🐇
Ready!
View GitHub Profile
// 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 May 11, 2024 09:51
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 April 1, 2022 11:19
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 May 4, 2024 14:06
React Native Bridging Cheatsheet
@powhu
powhu / GIF2MP4.swift
Last active December 28, 2023 22:41
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 June 7, 2021 07:18
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
@maciekish
maciekish / resetXcode.sh
Created August 10, 2016 10:13
Reset Xcode. Clean, clear module cache, Derived Data and Xcode Caches. You can thank me later.
#!/bin/bash
killall Xcode
xcrun -k
xcodebuild -alltargets clean
rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang/ModuleCache"
rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang.$(whoami)/ModuleCache"
rm -rf ~/Library/Developer/Xcode/DerivedData/*
rm -rf ~/Library/Caches/com.apple.dt.Xcode/*
open /Applications/Xcode.app