Skip to content

Instantly share code, notes, and snippets.

🌴
On vacation

RUSshy

🌴
On vacation
Block or report user

Report or block RUSshy

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View imgui.cs
private void renderDrawData()
{
var data = ImGui.GetDrawData();
Gl.Enable(EnableCap.Blend);
Gl.BlendEquation(BlendEquationMode.FuncAdd);
Gl.BlendFunc(BlendingFactor.SrcAlpha, BlendingFactor.OneMinusSrcAlpha);
Gl.Disable(EnableCap.CullFace);
Gl.Disable(EnableCap.DepthTest);
View test.d
public class Renderable
{
public Mat4 worldTransform;
public MeshPart meshPart = new MeshPart;
public Material material;
public Environment environment;
public Mat4[] bones;
public IShader shader;
}
View LinkedList.d
module robikstuff.LinkedList;
import std.algorithm;
/**
* Represents doubly linked list.
*
* Adding or removing elements at both list ends is constant time,
* accessing element at specified index takes O(n).
* List length is cached internally, so accessing list length is always O(1).
View ConsoleApp3.csproj
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{73DC8DE9-3244-4859-AA8F-6D34F5F431DF}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>ConsoleApp3</RootNamespace>
<AssemblyName>ConsoleApp3</AssemblyName>
View ConsoleApp1.csproj
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{BDF52DD2-689D-4452-996B-1FA5DE07B5E4}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>ConsoleApp1</RootNamespace>
<AssemblyName>ConsoleApp1</AssemblyName>
View ConsoleApplication1.csproj
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{CFA6F32A-827C-4D55-AA1F-5282AB1188DA}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ConsoleApplication1</RootNamespace>
@RUSshy
RUSshy / workbench.main.css
Created Mar 3, 2019
VSCode workbench fix
View workbench.main.css
/*!--------------------------------------------------------
* Copyright (C) Microsoft Corporation. All rights reserved.
*--------------------------------------------------------*/
.monaco-action-bar{text-align:right;overflow:hidden;white-space:nowrap}.monaco-action-bar .actions-container{display:flex;margin:0 auto;padding:0;width:100%;justify-content:flex-end}.monaco-action-bar.vertical .actions-container{display:inline-block}.monaco-action-bar.reverse .actions-container{flex-direction:row-reverse}.monaco-action-bar .action-item{cursor:pointer;display:inline-block;transition:transform 50ms ease;position:relative}.monaco-action-bar .action-item.disabled{cursor:default}.monaco-action-bar.animated .action-item.active{transform:scale(1.272019649)}.monaco-action-bar .action-item .icon{display:inline-block}.monaco-action-bar .action-label{font-size:11px;margin-right:4px}.monaco-action-bar .action-label.octicon{font-size:15px;line-height:35px;text-align:center}.monaco-action-bar .action-item.disabled .action-labe
View test.cs
public class Listener : IEcsWorldEventListener
{
void IEcsWorldEventListener.OnEntityCreated(int entity)
{
}
void IEcsWorldEventListener.OnEntityRemoved(int entity)
{
View stuff.cs
[EcsOneFrame]
public class EConnect
{
public string host;
public int port;
}
_world = new EcsWorld();
_tickSystem = new EcsSystems(_world);
_renderSystem = new EcsSystems(_world);
View glade.dtd
<!-- proposed DTD for new glade format -->
<!ELEMENT glade-interface (requires*, widget*) >
<!ATTLIST glade-interface
xmlns CDATA #FIXED 'http://glade.gnome.org/glade-2.0.dtd' >
<!ELEMENT requires EMPTY >
<!ATTLIST requires
lib CDATA #REQUIRED >
You can’t perform that action at this time.