Skip to content

Instantly share code, notes, and snippets.

@antonsem
antonsem / Geribildirim_2.cs
Last active December 15, 2021 22:07
Feedback_2
// Referanslar
// [1] https://gist.github.com/antonsem/09b4f902ed22adbdf8f664fac539543f
// [2] https://gist.github.com/antonsem/1b34acd82470f34a1fd45160c180834b
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
// [1]'de bahsettiğim gibi Türkçe değişken, sınıf ve metod isimleri kullanmak
@antonsem
antonsem / Original_1.cs
Last active August 13, 2021 09:21
Feedback_1
public class Original_1 : MonoBehaviour
{
public int boyut;
public bool isWork;
Transform Target;
public float Speed;
public bool Flip;
// Start is called before the first frame update
void Start()
@antonsem
antonsem / Feedback_EN.cs
Last active February 18, 2021 19:57
Feedback for a code snippet
// This is feedback and refactoring of a code snippet. You can see the original in feedback.png
public class Feedback_EN : MonoBehaviour
{
// Whenever we define a variable it allocates some memory and deallocates it back once we are done with the
// variable. This is called garbage collection, and a relatively slow process. Of course, a single ray won't
// affect the performance. In fact, it is called "micro-optimization." But why not do it if we can
private Ray _ray;
// Similarly, we don't need to redefine Raycast hit in each frame
@antonsem
antonsem / runExpressVPN.sh
Last active September 1, 2020 11:03
Automatically connect to ExpressVPN on login in Linux (tested on Pop!_OS 20.4)
#!/bin/bash
#Checks if expressVPN is connected. Connects if not.
#Assumes that the expressVPN is installed!
#Tested on Pop!_OS 20.4 (LTS)
#Let me know if there is a better way to do it, I'm a Linux noob!
#Run this script from ~/.profile, and it should work.
status=$(expressvpn status) #save the response from the VPN
read -ra connected <<< "$status" #seperate individual words
@antonsem
antonsem / arproxy.shader
Last active April 3, 2024 20:54 — forked from StigOlavsen/arproxy.shader
Unity shader for LWRP and AR Foundation, renders as transparent with occlusion and shadows. Put this on AR planes to get shadows and occlusion for 3D objects.
Shader "AR Proxy"
{
Properties
{
}
SubShader
{
Tags
{