Skip to content

Instantly share code, notes, and snippets.

View iDevelopThings's full-sized avatar

Sam Parton iDevelopThings

View GitHub Profile
@katas94
katas94 / WorldSpaceUIDocument.cs
Created October 27, 2021 19:11
Custom Unity component to create a world-space UIToolkit panel
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UIElements;
using UnityEngine.EventSystems;
using UnityEngine.Rendering;
namespace Katas.Experimental
{
public class WorldSpaceUIDocument : MonoBehaviour, IPointerMoveHandler, IPointerUpHandler, IPointerDownHandler,
ISubmitHandler, ICancelHandler, IMoveHandler, IScrollHandler, ISelectHandler, IDeselectHandler, IDragHandler
@wobsoriano
wobsoriano / App.vue
Last active November 23, 2022 17:13
Vue 3 Infinite Scroll Component
<script setup lang="ts">
import { ref } from 'vue';
import InfiniteScroll from '~/components/InfiniteScroll.vue';
import SkeletonPostItem from '~/components/SkeletonPostItem.vue';
interface State {
loaded: () => void;
complete: () => void;
}
@FilipSivak
FilipSivak / ue4_open_editor_utility_by_cpp.cpp
Created May 9, 2021 07:53
Unreal - open editor utility widget by C++
#include "EditorUtilityWidgetBlueprint.h"
#include "EditorUtilitySubsystem.h"
UObject * Blueprint = UEditorAssetLibrary::LoadAsset(FString(TEXT("EditorUtilityWidgetBlueprint'/Game/EditorUtilities/MyWidget.MyWidget'")));
if(IsValid(Blueprint)) {
UEditorUtilityWidgetBlueprint* EditorWidget = Cast<UEditorUtilityWidgetBlueprint>(Blueprint);
if (IsValid(EditorWidget)) {
UEditorUtilitySubsystem* EditorUtilitySubsystem = GEditor->GetEditorSubsystem<UEditorUtilitySubsystem>();
EditorUtilitySubsystem->SpawnAndRegisterTab(EditorWidget);
}
@ramingar
ramingar / vue-debug-webstorm.md
Created December 12, 2018 11:00
Webstorm Vue Debugging #vue #debug #webstorm
@josephbk117
josephbk117 / JarvisMarchConvexHull.cs
Last active November 3, 2022 17:01
Jarvis march convex hull unity c# script
/*Please do support www.bitshiftprogrammer.com by joining the facebook page : fb.com/BitshiftProgrammer
Legal Stuff:
This code is free to use no restrictions but attribution would be appreciated.
Any damage caused either partly or completly due to usage of this stuff is not my responsibility*/
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class JarvisMarchConvexHull : MonoBehaviour
{
@fideloper
fideloper / stream_file.php
Last active November 8, 2024 09:51
Stream file from S3 to browser, assume Laravel Filesystem usage
<?php
/*************************************************************************
* Get File Information
*/
// Assuming these come from some data source in your app
$s3FileKey = 's3/key/path/to/file.ext';
$fileName = 'file.ext';
@therightstuff
therightstuff / _end-to-end-enc.js.md
Last active December 19, 2023 02:17
Javascript / Node.js end-to-end encryption
@the-nerdery-dot-info
the-nerdery-dot-info / threaded_ue.cpp
Created October 29, 2016 21:42
how to accomplish cpu multithreading in unreal engine
UCLASS(config=Game)
class AMultiThreadingCharacter : public ACharacter
{
GENERATED_BODY()
/** Camera boom positioning the camera behind the character */
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Camera, meta = (AllowPrivateAccess = "true"))
class USpringArmComponent* CameraBoom;
/** Follow camera */
@grisevg
grisevg / FAsyncQueue.h
Last active July 17, 2024 18:09
Utility class for asynchronous/coroutine style programming in UE4 C++
#pragma once
/**
* FAsyncQueue can be used to run asynchronous delegates in sequence, parallel and combinations of the above
*
* Use Add() to enqueue delegates matching FAsyncDelegate signature:
* a void function that accepts a single argument of another void function with no arguments.
*
* Static factories MakeSync, MakeSequence and MakeParallel can be used to wrap different type of delegates and
* delegate collections into a single FAsyncDelegate which can be enqueued with Add().
@vluzrmos
vluzrmos / App_Http_VideoStream.php
Last active October 22, 2024 21:47
Laravel VideoStream.
<?php
namespace App\Http;
/**
* Description of VideoStream
*
* @author Rana
* @link https://gist.github.com/vluzrmos/d5682ad426525196d069
*/