Skip to content

Instantly share code, notes, and snippets.

View dresswithpockets's full-sized avatar
💝
comfy

Ashley dresswithpockets

💝
comfy
View GitHub Profile
using System;
using System.IO;
using System.Threading.Tasks;
public static class C {
public static (int, int) GetThing() => (1, 2);
public static void A1() {
GetThing();
}
@dresswithpockets
dresswithpockets / example.cs
Created August 12, 2021 14:56
differencec between discard and no discard in IL
using System.IO;
using System.Threading.Tasks;
public static class C {
public static async Task A() {
await File.ReadAllTextAsync("SomeFile.txt");
}
public static async Task B() {
_ = await File.ReadAllTextAsync("SomeFile.txt");
@dresswithpockets
dresswithpockets / OrientedRectangleF.cs
Created February 27, 2020 18:10
Represents a 4-point polygon that is transformable using a transform Matrix.
/*
* Based on:
* https://github.com/craftworkgames/MonoGame.Extended/blob/7c8de64caa135eaea39885a99e0e8e706a85bfad/Source/MonoGame.Extended/Math/Matrix2.cs
* https://github.com/craftworkgames/MonoGame.Extended/blob/7c8de64caa135eaea39885a99e0e8e706a85bfad/Source/MonoGame.Extended/Shapes/Polygon.cs
*
* Represents a 4-point polygon that is transformable using a transform Matrix.
*
* Copyright 2020 Ashley Horton
*
using System;
using System.Collections.Generic;
using System.Linq;
using MiscUtil.Collections;
namespace AshTools.Extensions
{
public static class RangeExtensions
{
/// <summary>
@import url('https://fonts.googleapis.com/css?family=Satisfy');
@import url("https://ellexidecodes.github.io/Discord-Themes/css/new-tags.css");
::selection {background:var(--main-color-faded) !important;}
/*
/$$$$$$
/$$__ $$
| $$ \ $$ /$$ /$$ /$$$$$$ /$$$$$$ /$$$$$$ /$$$$$$
| $$$$$$$$| $$ | $$ /$$__ $$ /$$__ $$ /$$__ $$|____ $$
| $$__ $$| $$ | $$| $$ \__/| $$ \ $$| $$ \__/ /$$$$$$$
| $$ | $$| $$ | $$| $$ | $$ | $$| $$ /$$__ $$
pub fn challenge3() {
let valid_chars: Vec<char> = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789,.- ".chars().collect();
let repeated_char_score = 1;
let mut input = String::new();
println!("Single-byte XOR cipher");
print!("encoded string> ");
io::stdout().flush().unwrap();
io::stdin().read_line(&mut input).expect("Failed to read line");
// chain matches to the first true case, and then continues to reiterate and match until no cases return true.
let x := chain {
true => 5,
x == 6 => x * 2,
x == 5 => x + 1,
x == 7 => 0
}
class Player : Actor, IHealthy, IAttacker
{
public float MaxHealth { get; }
public float Health { get; private set; }
public float AttackDamage { get; private set; }
public void DealDamage(float damage)
{
Health = Mathf.Clamp(Health - damage, 0f, MaxHealth);
if (Health == 0f)
{
#version 330 core
out vec4 FragColor;
void main()
{
FragColor = vec4(1.0f, 0.5f, 0.2f, 1.0f);
}

Issues

In the Moving Forward Project, we leverage Github issues to efficantly translate work done into documentable efforts.

Issue Assignments

In the olde days of chat issues, devs would accept issues that were created by the CS team. Instead, developers assign github issues to themselves and document changes in the comment section, closing the issue upon completion.

Issue Types