Skip to content

Instantly share code, notes, and snippets.

View FaizanDurrani's full-sized avatar
‼️

Faizan Durrani FaizanDurrani

‼️
View GitHub Profile
@FaizanDurrani
FaizanDurrani / Promise.swift
Last active December 25, 2020 21:35
Lightweight, Partial implementation of Promises in Swift
import Foundation
class Promise<PromiseValue> {
typealias ResolveCallback<Value, Return> = (_ value: Value) throws -> Return
typealias RejectCallback = (_ reason: Error) -> Void
var result: Result<PromiseValue, Error>?
private var resolver: ResolveCallback<PromiseValue, Void>?
private var rejector: RejectCallback?
using UnityEngine;
using UnityEditor;
using UnityEditorInternal;
using System.Collections.Generic;
namespace NaughtyAttributes.Editor
{
[PropertyDrawer(typeof(ReorderableListAttribute))]
public class ReorderableListPropertyDrawer : PropertyDrawer
{
#EXTM3U
#EXTINF:0,Channel 1
rtsp://www.staging.ebravo.pk:1935/live/tv1.stream
#EXTINF:0,Channel 2
rtsp://www.staging.ebravo.pk:1935/live/tv2.stream
#EXTINF:0,Channel 3
rtsp://www.staging.ebravo.pk:1935/live/tv3.stream
#EXTINF:0,Channel 4
rtsp://www.staging.ebravo.pk:1935/live/tv4.stream
#EXTINF:0,Channel 5
@FaizanDurrani
FaizanDurrani / SceneProjectView.cs
Created May 31, 2017 17:11
Creates a new editor window to list all the scenes in your project, Improves workflow if you have a ton of directories and scenes.
using UnityEditor;
using UnityEditor.SceneManagement;
using UnityEngine;
public class SceneProjectView : EditorWindow {
private GUIStyle alternateColor;
private Texture2D tex;
[MenuItem("Window/Scene Project View")]
public static void Init()