Skip to content

Instantly share code, notes, and snippets.

View iDevelopThings's full-sized avatar

Sam Parton iDevelopThings

View GitHub Profile
@iDevelopThings
iDevelopThings / annotation_example.php
Created January 25, 2023 07:31
Get php doc block annotations data(could be used alongside reflection to get return types etc)
<?php
class SomethingElse
{
}
class Something
{
@iDevelopThings
iDevelopThings / GetHashIdCommand.php
Last active January 25, 2023 11:08
HashIds in laravel
<?php
namespace App\Console\Commands;
use App\Support\HashIds;
use Illuminate\Console\Command;
use Illuminate\Contracts\Container\BindingResolutionException;
use Spatie\ModelInfo\ModelFinder;
use Str;
class GetHashIdCommand extends Command
@iDevelopThings
iDevelopThings / GizmoExtension.cs
Created February 12, 2023 03:24
GizmoTextPls
using UnityEditor;
using UnityEngine;
namespace Game.Util.Extensions
{
public class GizmoExtension
{
public static void DrawString(string text, Vector3 worldPosition, Color textColor, Vector2 anchor, float textSize = 15f)
{
#include "Reflection/FunctionCallUtil.h"
FFunctionCallParamInfo::FFunctionCallParamInfo() = default;
FFunctionCallParamInfo::FFunctionCallParamInfo(bool InIsReturnParam, const FString& InName, int InIndex, FProperty* InProperty):
IsReturnParam(InIsReturnParam),
Name(InName),
Index(InIndex),
Property(InProperty) {}
@iDevelopThings
iDevelopThings / UMGSplitter.cpp
Created November 15, 2024 06:36
Slates SSplitter as a UMG Widget
#include "UI/UMGSplitter.h"
#include "Widgets/SWeakWidget.h"
#include UE_INLINE_GENERATED_CPP_BY_NAME(UMGSplitter)
#pragma region "Splitter Slot"
UUMGSplitterSlot::UUMGSplitterSlot(const FObjectInitializer& Oi): Super(Oi) {
Slot = nullptr;
}
void UUMGSplitterSlot::ReleaseSlateResources(bool bReleaseChildren) {
package icons_service
import (
"context"
"fmt"
"image"
"image/png"
"io"
"net/http"
"os"