Skip to content

Instantly share code, notes, and snippets.

@MattFiler
MattFiler / MockHMDSubsystem.cs
Last active January 14, 2025 11:41
Allows the use of a 3-dof or 6-dof camera system to be interpreted by Unity's XR system if it initially bypasses that setup, fixing things that rely on the XR system like XRI. Link the left/right/center eye cameras and enable Unity's Mock HMD Loader in XR settings. Useful for setups like NREAL.
using UnityEngine;
using UnityEngine.InputSystem.Layouts;
using UnityEngine.InputSystem.XR;
using UnityEngine.InputSystem;
using UnityEngine.XR.Interaction.Toolkit.Inputs.Simulation;
using UnityEngine.XR.Interaction.Toolkit.Inputs;
using UnityEngine.XR.Interaction.Toolkit;
using UnityEngine.InputSystem.LowLevel;
[DefaultExecutionOrder(XRInteractionUpdateOrder.k_DeviceSimulator)]
@jedster1111
jedster1111 / .gitattributes
Created September 18, 2024 13:57
Unreal .gitignore and .gitattributes template (Copied from Team Borealis' UEGitPlugin)
[attr]lock filter=lfs diff=lfs merge=binary -text lockable
[attr]lockonly lockable
[attr]lfs filter=lfs diff=lfs merge=binary -text
[attr]lfstext filter=lfs diff=lfstext merge=lfstext -text
# Unreal Engine file types.
*.uasset lock
*.umap lock
*.locres lfs
*.locmeta lfs
# Steam Audio files
@pankaj28843
pankaj28843 / Make soffice command of Libreoffice work on Mac OS X.md
Last active January 14, 2025 11:40
Make soffice command of Libreoffice work on Mac OS X

Deprecated Notice

This script, originally created on April 29, 2015, addressed a different behavior of LibreOffice installation on macOS at that time. However, it is now outdated and no longer relevant. Please refer to the latest comments for updated information, as much has changed over the past 8–9 years.


Quick Start

sudo curl https://gist.githubusercontent.com/pankaj28843/3ad78df6290b5ba931c1/raw/soffice.sh > /usr/local/bin/soffice && sudo chmod +x /usr/local/bin/soffice
@ramsey
ramsey / remove-followers.js
Last active January 14, 2025 11:40 — forked from JamieMason/unfollow.js.md
Remove everyone following you on twitter.com
// Remove everyone following you on twitter.com
// https://gist.github.com/ramsey/bdeefda66d6e2294d3466edcea30187b
//
// 1. Go to https://twitter.com/YOUR_USER_NAME/followers
// 2. Open the Developer Console. (COMMAND+ALT+I on Mac)
// 3. Paste this into the Developer Console and run it
//
// If you start seeing error messages in the console with the code
// "429," this means Twitter is rate-limiting you. Stop the script
// (i.e., reload or close the browser tab), and try again later.
@norton120
norton120 / base_schema.py
Created July 24, 2024 13:59
This is one strategy to handling ids in schemas
from typing import Tuple, Optional
from uuid import UUID
from logging import getLogger
from pydantic import BaseModel, Field, field_validator
logger = getLogger(__name__)
class BaseSchema(BaseModel):
@akordowski
akordowski / RenameWslDistro.ps1
Last active January 14, 2025 11:33
RenameWslDistro.ps1
function Rename-WslDistro {
param (
[string]$OldDistroName,
[string]$NewDistroName
)
Clear-Host
Write-Warning "This function performs a rename operation on the Windows Registry."
$confirm = Read-Host "Do you want to proceed? (y/n)"
//
// ViewController.swift
// Dicee-iOS13
//
// Created by Angela Yu on 11/06/2019.
// Copyright © 2019 London App Brewery. All rights reserved.
//
import UIKit
@edakizak
edakizak / intro-to-flutter-widgets.dart
Last active January 14, 2025 11:31
Flutter x Codeacademy
//An Application Starting Point: we define our app inside of main which calls runApp. Inside of that call we have the MaterialApp widget which provides important information about our app. Inside of MaterialApp we use the Scaffold widget, which provides our app with a structure.
// import 'package:flutter/material.dart';
//void main() { *function invokes runApp*
//runApp(
//const MaterialApp(
// home: Scaffold() *widget parameter*
// )
// );
// }
@qoomon
qoomon / conventional-commits-cheatsheet.md
Last active January 14, 2025 11:30
Conventional Commits Cheatsheet

Conventional Commit Messages starline

See how a minor change to your commit message style can make a difference.

Tip

Have a look at git-conventional-commits , a CLI util to ensure these conventions, determine version and generate changelogs

Commit Message Formats

Default

@WolfgangSenff
WolfgangSenff / gist:168cb0cbd486c8c9cd507f232165b976
Last active January 14, 2025 11:29
Godot 4.0 Migration/Upgrade guide
## For a beginner-friendly version of the following (more advanced users likely will get better use of the below,
## if you're just starting out...), see this new gist:
## https://gist.github.com/WolfgangSenff/0a9c1d800db42a9a9441b2d0288ed0fd
This document represents the beginning of an upgrade or migration document for GDScript 2.0 and Godot 4.0. I'm focusing on 2D
at the moment as I'm upgrading a 2D game, but will hopefully have more to add for 3D afterward.
## If you want more content like this, please help fund my cat's medical bills at https://ko-fi.com/kyleszklenski - thank you very much! On to the migration guide.