Skip to content

Instantly share code, notes, and snippets.

View unitycoder's full-sized avatar
✅
‏‏‎

mika unitycoder

✅
‏‏‎
View GitHub Profile
@unitycoder
unitycoder / CherryMX.md
Last active January 26, 2023 10:21
whats the different on these keyboard switches? Mechanical Keyboard: Blue Switch Red Switch Brown Switch Silver Switch and Cherry MX

//chatGPT

Cherry MX is a brand of mechanical switches for keyboards, and they are one of the most popular and widely used switch types in the market. They are known for their durability and consistent feel across the different types of switches they offer. Cherry MX switches are available in several different colors, each with its own unique characteristics. The colors are often used to indicate the switch's characteristics, but it's important to note that the color code is not standardized across different brands. The most common colors for Cherry MX switches are:

  • Blue: Tactile and Clicky
  • Red: Linear and Smooth
  • Brown: Tactile and Quiet
  • Black: Linear and Heavy
  • Clear: Tactile and Heavy
//PIXELBOY BY @WTFMIG EAT A BUTT WORLD BAHAHAHAHA POOP MY PANTS
// - edited by @Nothke to use screen height for #LOWREZJAM
using UnityEngine;
using System.Collections;
[ExecuteInEditMode]
[AddComponentMenu("Image Effects/PixelBoy")]
public class PixelBoy : MonoBehaviour
{
public int h = 64;
@unitycoder
unitycoder / StockPriceQuery.cs
Last active February 2, 2023 15:20
Get stock price from Finance yahoo or alphavantage API (unity webequest)
// chatGPT
using UnityEngine;
using UnityEngine.Networking;
public class StockPriceQuery : MonoBehaviour
{
public string stockSymbol = "AAPL";
public string url = "https://finance.yahoo.com/quote/{0}?p={0}";
void Start()
@unitycoder
unitycoder / chrome how to inject new script to page, developer tools.md
Last active February 7, 2023 19:19
firefox how to edit or override javascript variable from F12 debugger?

chrome how to inject new script to page, developer tools?

To inject a new script into a web page in Firefox using the Developer Tools, you can follow these steps:

Open the web page you want to inject the script into in Firefox and press F12 to open the Developer Tools.

Navigate to the "Debugger" tab.

Click on the "Sources" panel.
@unitycoder
unitycoder / visitor.php
Created February 9, 2023 07:07
make simple php script that sends email with visitor ip and browser useragent
//chatGPT
<?php
$to = "recipient@example.com";
$subject = "Visitor Information";
$message = "A visitor has just accessed your website.\n\n";
$message .= "IP address: " . $_SERVER['REMOTE_ADDR'] . "\n";
$message .= "Browser user agent: " . $_SERVER['HTTP_USER_AGENT'];
$headers = "From: sender@example.com" . "\r\n";
@unitycoder
unitycoder / FogComponent.cs
Created February 9, 2023 07:59 — forked from cs-altshift/FogComponent.cs
Simple Fog Shader
using UnityEngine;
[RequireComponent(typeof(Camera))]
public class FogComponent : MonoBehaviour
{
public Shader myFogShader;
public Color fogColor = Color.red;
private Material myFogMaterial;
using UnityEngine;
using UnityEngine.Rendering;
using UnityEngine.Rendering.Universal;
public class TestRendererFeature : ScriptableRendererFeature
{
private TestRenderPass testRenderPass;
public Material fogMaterial;
public Color fogColor;
@unitycoder
unitycoder / SeededRandomNumberGenerator.cs
Created February 9, 2023 07:59 — forked from cs-altshift/SeededRandomNumberGenerator.cs
C# Allocation-free Seeded Random Number Generator
using System;
namespace AltShift.Maths.Randomization
{
// No-alloc version coded from Random source code
// https://referencesource.microsoft.com/#mscorlib/system/random.cs
public unsafe struct SeededRandomNumberGenerator
{
private const int MSEED = 161803398;
private const int MZ = 0;
@unitycoder
unitycoder / ExtendedColors.cs
Created February 9, 2023 08:00 — forked from cs-altshift/ExtendedColors.cs
Extended Colors for Unity
using UnityEngine;
namespace AltShift.Productivity
{
// Extracted from: https://www.december.com/html/spec/colorpercompact.html
public static class ExtendedColor
{
public static Color _100_euro = new Color(0.53f, 0.78f, 0.49f);
public static Color _20_pound = new Color(0.64f, 0.4f, 0.51f);
public static Color _6_ball = new Color(0.11f, 0.39f, 0.33f);
@unitycoder
unitycoder / ScreenSpaceNormals.shader
Created February 9, 2023 08:00 — forked from cs-altshift/ScreenSpaceNormals.shader
Screen-space normals shader for Unity - Compatible with URP
Shader "Unlit/Screen Space Normals"
{
Properties
{
}
SubShader
{
Tags { "RenderType"="Opaque" }
Pass