Skip to content

Instantly share code, notes, and snippets.

View taylus's full-sized avatar

taylus

View GitHub Profile
@taylus
taylus / CPUWaster.cs
Created February 26, 2020 17:46
Forcing high CPU usage for use with load testing other programs
using System;
using System.Threading.Tasks;
namespace CPUWaster
{
public class Program
{
public const double DesiredLoad = 0.75; //1 = 100%
public static void Main()
@taylus
taylus / notepad++.regex
Created February 10, 2020 05:02
Regex to turn AA BB CC DD into 0xAA, 0xBB, 0xCC, 0xDD
Find what: ([0-9A-Fa-f])([0-9A-Fa-f])
Replace with: 0x\1\2,
Search mode: Regular expression
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"defaultProfile": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
"profiles":
@taylus
taylus / LoadImage.cs
Created August 1, 2019 21:51
Loading an image from a base64 encoded string using ImageSharp
using System;
using System.Diagnostics;
using SixLabors.ImageSharp;
//...
var base64EncodedImage = "iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==";
var imageBytes = Convert.FromBase64String(base64EncodedImage);
using (var image = Image.Load(imageBytes))
{
@taylus
taylus / ssh-rmate
Last active November 8, 2018 01:21
#!/usr/bin/env bash
#https://medium.com/@prtdomingo/editing-files-in-your-linux-virtual-machine-made-a-lot-easier-with-remote-vscode-6bb98d0639a4
ssh -R 52698:localhost:52698 brandon@edgar
@taylus
taylus / DEBUG.INC
Created September 15, 2018 22:21 — forked from Leandros/DEBUG.INC
Debugging Messages in no$gmb and BGB
IF !DEF(DEBUG_INC)
DEBUG_INC SET 1
; Prints a message to the no$gmb / bgb debugger
; Accepts a string as input, see emulator doc for support
DBGMSG: MACRO
ld d, d
jr .end\@
DW $6464
DW $0000
; if (a == $05)
    cp $05
    jr nz, .else_if     ;----+
    ; ...                    |
    jr .end_if          ;----|----+
.else_if:               ;<---+    |
    cp $06              ;         |
    jr nz, .else        ;---------|----+
 ; ... | |
id first_name last_name email gender ip_address
1 Amaleta Ector aector0@discovery.com Female 79.127.77.151
2 Wallache Dood wdood1@mapquest.com Male 71.64.169.45
3 Elset Phipp ephipp2@ebay.co.uk Female 243.105.200.107
4 Hogan Loutheane hloutheane3@flavors.me Male 164.230.229.62
5 Issy McDoual imcdoual4@addtoany.com Female 231.50.160.40
6 Dewain Jeakins djeakins5@ocn.ne.jp Male 48.183.13.119
7 Sissie Ochiltree sochiltree6@pagesperso-orange.fr Female 190.67.96.114
8 Karita Dundendale kdundendale7@narod.ru Female 60.155.112.42
9 Modestia Charkham mcharkham8@nyu.edu Female 181.164.21.28

Web dev resources for Al

Source control (for versioning and keeping history of your code)

Editors/IDEs

Target audience

.NET Core developers using Travis CI builds who want code coverage automatically generated and uploaded to Coveralls.

Generating code coverage

Add the coverlet.msbuild NuGet package to your test project:

dotnet add package coverlet.msbuild