Skip to content

Instantly share code, notes, and snippets.

View manio143's full-sized avatar

Marian Dziubiak manio143

View GitHub Profile
@manio143
manio143 / NUnitAttributes.md
Last active May 18, 2016 08:05
Usefull NUnit Attributes

Usefull NUnit Attributes

Attribute Description
[Category(string)] Specifies one or more categories for the test.
[Description(string)] Applies descriptive text to a Test, TestFixture or Assembly.
[Explicit] Indicates that a test should be skipped unless explicitly run.
[Ignore]
[Maxtime(milliseconds)] Specifies the maximum time in milliseconds for a test case to succeed.
[Order(int)] Specifies the order in which decorated test should be run (against others).
@manio143
manio143 / DesertEx.tmTheme
Created February 10, 2017 22:02
Visual Studio Code theme - DesertEx+ (DesertEx with F# additions)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!-- Generated by: TmTheme-Editor -->
<!-- ============================================ -->
<!-- app: http://tmtheme-editor.herokuapp.com -->
<!-- code: https://github.com/aziz/tmTheme-Editor -->
<plist version="1.0">
<dict>
<key>author</key>
<string>Dylan Sarber (Originally by Ming Bai on Vim) modified by Marian Dziubiak</string>
// F#+ sample monad usage
#r "FSharpPlus.dll"
open FSharpPlus
open FSharpPlus.Data
//open FSharpPlus.Operators
let s9 = Some 9
let add5divXmul2 (o : int option) x = monad {
@manio143
manio143 / ddns.py
Created January 19, 2019 13:21
A nice script to auto update DNS records in CloudFlare
#!/usr/bin/env python3
import requests
import json
import subprocess
home = "/home/manio/"
authKey = ""
email = ""
@manio143
manio143 / AsyncState.fs
Created February 17, 2019 20:17
F# implementation of (StateT s Async)
module AsyncState
type AsyncState<'s, 'a> = private AsyncState of ('s -> Async<'s * 'a>)
module AsyncState =
//Monad
let result x = AsyncState <| fun s -> async {return (s, x)}
let run (AsyncState f) = f
let bind f m = AsyncState <| fun s -> async {
let! (s', a) = run m s
@manio143
manio143 / zaufany_signer.py
Created June 10, 2019 12:54
Skrypt, który teoretycznie ma nieco przyśpieszyć podpisywanie plików profilem zaufanym przez portal obywatel.gov.pl
#!/usr/bin/env python3
import requests
import json
import sys
import os.path
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from http.cookiejar import Cookie
@manio143
manio143 / Option.cs
Created May 5, 2020 20:22
C# Sum algebraic types
using System;
namespace SumTypes
{
public abstract class Option<T> : SumType<Option<T>.Enum>
{
public enum Enum { None = 0, Some = 1 }
private Option(Enum tag) : base(tag) { }
public sealed class None : Option<T>
{

Stride UI/UX discussion summary

This document is meant to summarize the discussion that started at the end of June 2020 about improving Stride's UI (Game Studio's UI).

Initially MechWarrior99 came up with some ideas on making the UX better. One of these ideas was to make something akin to Blender's Workspaces. Then this issue was mentioned - it may have inspired #637 and #667, which tried to improve somewhat the current UI.

Next MechWarrior99 worked on the improved UI design of different parts of Stride, starting with components (msg). During that time qbic suggested changes to the 3D translation gizmo ([msg](https://discordapp.com/channels/500285081265635328/727168636770582581/728626959126

@manio143
manio143 / Stride Editor design document.md
Last active April 10, 2024 02:03
Stride Editor current design document

Current Stride Editor design document

This document is meant to describe the architecture of the current Stride Editor, so that it's easier to read its source code and rewrite it in a better way. This is in now way a complete document as the Editor is about 35k LOC. I'm slowly going to read through the more interesting parts and note down my thoughts.

View hierarchy

  • GameStudioWindow
    • static top bar menu
    • static asset context menu
    • static key bindings (start/cancel build, run game, open debug window, copy asset, show add asset dialog)
  • static toolbar tray (icon buttons)
@manio143
manio143 / stride_linux.md
Last active November 4, 2020 17:49
How to build Stride for Linux

Stride uses the MSBuild system to the max. This is an instruction on how to build Stride packages so that they can be used under Linux to compile a project (excluding asset compilation).

In /build/Stride.build are the definitions of builds for different platforms/graphics systems. I will be invoking the build for Linux OpenGL, so I'm going to invoke a command

msbuild .\Stride.build /target:BuildLinux

This command should be invoked from the Visual Studio 2019 Developer PowerShell, so that all environment variables are properly set. Best open it from Visual Studio (Ctrl+Q -> PowerShell).