Skip to content

Instantly share code, notes, and snippets.

View shana's full-sized avatar
🥽
glub glub

Andreia Gaita shana

🥽
glub glub
View GitHub Profile
@shana
shana / gist:6a5a87fbf09990adf0cc21a40bb6c448
Created February 16, 2024 11:05
jq filter array of objects that have an inner array with some entries that matches the given array
{
"mirrors":
[
{
"type": "A",
"platforms":
[
"entry1"
]
},
@shana
shana / gist:69769dde3572029e01e8206b77aa83a4
Created December 12, 2023 13:41
Generic public things
Some content
@shana
shana / .gitattributes
Created January 5, 2021 10:45
.gitattributes for Unity
* text=auto
# Unity files
*.meta -text merge=unityyamlmerge diff
*.unity -text merge=unityyamlmerge diff
*.asset -text merge=unityyamlmerge diff
*.prefab -text merge=unityyamlmerge diff
*.mat -text merge=unityyamlmerge diff
*.anim -text merge=unityyamlmerge diff
*.controller -text merge=unityyamlmerge diff
@shana
shana / key.md
Created November 21, 2020 22:14
Twitter (un)official Consumer Key

Twitter Official Consumer Key

Twitter for Android

type:            PIN
Consumer key:    3nVuSoBZnx6U4vzUxf5w
Consumer secret: Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys

Twitter for iPhone

type:            PIN

Consumer key: IQKbtAYlXLripLGPWd0HUA

@shana
shana / AssetReferenceScene.cs
Created November 20, 2020 15:21
Implementation of AssetReferenceT for referencing addressables scene with a nice selector UI in the Unity Inspector.
using System;
using UnityEditor;
using UnityEngine.AddressableAssets;
[Serializable]
public class AssetReferenceScene : AssetReferenceT<SceneReference>
{
/// <summary>
/// Constructs a new reference to a GameObject.
/// </summary>
@shana
shana / UnusedHDTexturesRule.cs
Last active November 19, 2020 15:37
Addressables analysis rule that raises warnings for textures that aren't marked as addressables, given certain conditions
using System.Collections.Generic;
using System.Linq;
using UnityEditor;
using UnityEditor.AddressableAssets.Build;
using UnityEditor.AddressableAssets.Build.AnalyzeRules;
using UnityEditor.AddressableAssets.Settings;
using UnityEngine;
public class UnusedHDTexturesRule : AnalyzeRule
@shana
shana / .gitignore
Created November 1, 2020 14:45
gitignore for repos with Unity projects
# Created by https://www.toptal.com/developers/gitignore/api/Unity
# Edit at https://www.toptal.com/developers/gitignore?templates=Unity
### Unity ###
# This .gitignore file should be placed at the root of your Unity project directory
#
# Get latest from https://github.com/github/gitignore/blob/master/Unity.gitignore
[Ll]ibrary/
[Tt]emp/
@shana
shana / raspberry-pi-zero_as_webcam.md
Created August 26, 2020 15:03 — forked from justinschuldt/raspberry-pi-zero_as_webcam.md
Directions for setting up a RaspberryPi to act as a generic USB webcam

hardware/software

Webcam parts:

  • Raspberry Pi Zero W Rev 1.1
  • Raspberry Pi Camera v2 (8-megapixel)
  • Raspberry Pi High Quality Camera (12.3-megapixel)
  • Raspbian Buster Lite 2020-02-13

Webcam works with:

  • Windows 10
  • Windows 10 "Camera" app
@shana
shana / DebugData.cs
Created July 23, 2020 14:52
Writing debug data in the Entity Debugger
using Unity.Collections;
using Unity.Entities;
using UnityEngine;
public struct DebugName : IComponentData
{
public NativeString64 Value;
#if UNITY_EDITOR
// To make this work, it requires EntityComponentInspector: [URL]https://github.com/OndrejPetrzilka/EntityComponentInspector[/URL]