Skip to content

Instantly share code, notes, and snippets.

Avatar

Jarl Gullberg Nihlus

View GitHub Profile
View Program.cs
using System;
using System.IO;
using System.Text.Json;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Remora.Discord.API.Abstractions.Events;
using Remora.Discord.Gateway;
using Remora.Discord.Gateway.Extensions;
View fiddle.cs
// @nuget: CommandLineParser -Version 2.7.82
using System;
using System.Collections.Generic;
using CommandLine;
public class Program
{
View vmalloc.txt
0xffffacb250000000-0xffffacb260001000 268439552 amdgpu_ttm_init+0xd3/0x3b0 [amdgpu] phys=0x00000000e0000000 ioremap
0xffffacb244000000-0xffffacb248001000 67112960 pci_mmcfg_arch_map+0x2f/0x70 phys=0x00000000f8000000 ioremap
0xffffffffc052e000-0xffffffffc091a000 4112384 layout_and_allocate+0x541/0xbc0 pages=1003 vmalloc vpages N0=1003
0xffffacb241096000-0xffffacb241461000 3977216 ttm_bo_kmap+0x19c/0x270 [ttm]
0xffffffffc09c7000-0xffffffffc0c83000 2867200 layout_and_allocate+0x541/0xbc0 pages=699 vmalloc vpages N0=699
0xffffacb241649000-0xffffacb24184a000 2101248 __do_sys_swapon+0x6fb/0x11b0 pages=512 vmalloc N0=512
0xffffccb23fc00000-0xffffccb23fe00000 2097152 pcpu_get_vm_areas+0x0/0xbe0 vmalloc
0xffffccb23fa00000-0xffffccb23fc00000 2097152 pcpu_get_vm_areas+0x0/0xbe0 vmalloc
0xffffacb240e2d000-0xffffacb240f95000 1474560 ttm_bo_kmap+0x19c/0x270 [ttm]
0xffffffffc0cfa000-0xffffffffc0e29000 1241088 layout_and_allocate+0x541/0xbc0 pages=302 vmalloc N0=302
View ps-axfv.txt
PID TTY STAT TIME MAJFL TRS DRS RSS %MEM COMMAND
2 ? S 0:00 0 0 0 0 0.0 [kthreadd]
3 ? I< 0:00 0 0 0 0 0.0 \_ [rcu_gp]
4 ? I< 0:00 0 0 0 0 0.0 \_ [rcu_par_gp]
6 ? I< 0:00 0 0 0 0 0.0 \_ [kworker/0:0H-kb]
9 ? I< 0:00 0 0 0 0 0.0 \_ [mm_percpu_wq]
10 ? S 0:08 0 0 0 0 0.0 \_ [ksoftirqd/0]
11 ? I 3:25 0 0 0 0 0.0 \_ [rcu_sched]
12 ? S 0:00 0 0 0 0 0.0 \_ [migration/0]
13 ? S 0:00 0 0 0 0 0.0 \_ [idle_inject/0]
View issue.txt
Using project '/home/jarl/Programming/EFCore.Repro/EFCore.Repro/EFCore.Repro.csproj'.
Using startup project '/home/jarl/Programming/EFCore.Repro/EFCore.Repro/EFCore.Repro.csproj'.
Writing '/home/jarl/Programming/EFCore.Repro/EFCore.Repro/obj/EFCore.Repro.csproj.EntityFrameworkCore.targets'...
dotnet msbuild /target:GetEFProjectMetadata /property:EFProjectMetadataFile=/tmp/tmpkVzdx4.tmp /verbosity:quiet /nologo /home/jarl/Programming/EFCore.Repro/EFCore.Repro/EFCore.Repro.csproj
Writing '/home/jarl/Programming/EFCore.Repro/EFCore.Repro/obj/EFCore.Repro.csproj.EntityFrameworkCore.targets'...
dotnet msbuild /target:GetEFProjectMetadata /property:EFProjectMetadataFile=/tmp/tmpQuRkYT.tmp;TargetFramework=netcoreapp3.0 /verbosity:quiet /nologo /home/jarl/Programming/EFCore.Repro/EFCore.Repro/EFCore.Repro.csproj
dotnet build /home/jarl/Programming/EFCore.Repro/EFCore.Repro/EFCore.Repro.csproj --framework netcoreapp3.0 /verbosity:quiet /nologo
Build succeeded.
0 Warning(s)
@Nihlus
Nihlus / discord-old.css
Created Sep 10, 2019
Discord's old CSS settings. Use this to revert the latest theme changes.
View discord-old.css
This file has been truncated, but you can view the full file.
.anchor-3Z-8Bb{color:#00b0f4;text-decoration:none}.anchorUnderlineOnHover-2ESHQB:hover{text-decoration:underline}
View model.cs
modelBuilder.Entity<AppearanceConfiguration>()
.OwnsOne(ac => ac.DefaultAppearance, dao =>
{
dao.ToTable("Appearances", SchemaName);
dao.OwnsMany(a => a.Components, ao =>
{
ao.ToTable("AppearanceComponents", SchemaName);
ao.OwnsOne(c => c.BaseColour, od => od.ToTable("BaseColours", SchemaName));
View AutoProperty.h
//
// AutoProperty.h
//
// Author:
// Jarl Gullberg <jarl.gullberg@gmail.com>
//
// Copyright (c) 2019 Jarl Gullberg
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
View exporter.cs
/// <summary>
/// Converts the given MDX model into an Assimp representation.
/// </summary>
/// <param name="model">The model.</param>
/// <returns>The Assimp representation.</returns>
public static Scene FromMDX(MDX model)
{
var scene = new Scene();
var rootNode = new Node();
View proj.glsl
vec3 ProjectToScreen(mat3 viewportMatrix, vec4 clipSpaceCoordinate)
{
vec3 NDC = clipSpaceCoordinate.xyz / clipSpaceCoordinate.w;
return viewportMatrix * NDC;
}
You can’t perform that action at this time.