Skip to content

Instantly share code, notes, and snippets.

Shaun Wilson wilson0x4d

Block or report user

Report or block wilson0x4d

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 Update-AssemblyInfos.ps1
#
# assigns $env:BUILD_VERSION as the `AssemblyVersion` and
# `AssemblyFileVersion` values for all "AssemblyInfo.cs"
# files under current directory.
#
Get-ChildItem -R AssemblyInfo.cs | %{ $_.FullName } | %{
cp $_ $('$_.tmp');
(Get-Content -Raw $('$_.tmp')) -replace '(AssemblyFileVersion|AssemblyVersion)\(\"[^\"]*',$('$1("' + $env:BUILD_VERSION) > $_;
}
@wilson0x4d
wilson0x4d / syntax.s
Created Oct 25, 2019 — forked from mishurov/syntax.s
AT&T assembly syntax and IA-32 instructions
View syntax.s
# --------
# Hardware
# --------
# Opcode - operational code
# Assebly mnemonic - abbreviation for an operation
# Instruction Code Format (IA-32)
# - Optional instruction prefix
# - Operational code
@wilson0x4d
wilson0x4d / style.less
Created Dec 3, 2018
A set of "Markdown Preview Enhanced" styles to provide a softer "Dark Theme" in "Visual Studio Code".
View style.less
/* Please visit the URL below for more information: */
/* https://shd101wyy.github.io/markdown-preview-enhanced/#/customize-css */
.markdown-preview.markdown-preview {
background-color: #111;
color: #777;
> h1, h2, h3, h4, h5, h6,
b, em, i, strong {
color: #aaa;
}
> a {
View Download-NintendoPower.ps1
# Downloads Nintendo Power editions 1988 through 1999 from "annarchive.com"
mkdir NintendoPower_88to99
cd .\NintendoPower_88to99\
$uris = @(
"http://annarchive.com/files/Nintendo%20Power%20Issue%20001%20July-August%201988.cbr",
"http://annarchive.com/files/Nintendo%20Power%20Issue%20002%20September-October%201988.cbr",
"http://annarchive.com/files/Nintendo%20Power%20Issue%20003%20November-December%201988.cbr",
"http://annarchive.com/files/Nintendo%20Power%20Issue%20004%20January-February%201989.cbr",
View gist:01e59170306e3854e36826e5945a6ef5
/// <summary>
/// This is about indentation/formatting practices in the wild,
/// don't overanalyze the content.
/// <para>See Also: http://bit.ly/CSharpFormattingPoll </para>
/// </summary>
class Foo
{
/// <summary>
/// Basis; seasoned C# programmers get cringy when
/// they see code that trails off to the Nth column
View shenc.cs
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Sockets;
using System.Security.Cryptography;
using System.Text;
@wilson0x4d
wilson0x4d / Benchmark.txt
Last active Jul 12, 2019
Benchmark of `StackTrace`, `StackFrame` and `CallerMemberNameAttribute`.
View Benchmark.txt
BenchmarkDotNet=v0.10.13, OS=Windows 10 Redstone 3 [1709, Fall Creators Update] (10.0.16299.248)
Intel Core i7-7700K CPU 4.20GHz (Kaby Lake), 1 CPU, 8 logical cores and 4 physical cores
.NET Core SDK=2.1.4
[Host] : .NET Core 2.0.5 (CoreCLR 4.6.26020.03, CoreFX 4.6.26018.01), 64bit RyuJIT
DefaultJob : .NET Core 2.0.5 (CoreCLR 4.6.26020.03, CoreFX 4.6.26018.01), 64bit RyuJIT
Method | Mean | Error | StdDev | Median |
---------------------------- |---------:|----------:|----------:|---------:|
Diagnostics_StackTrace_Cost | 34.34 us | 0.2898 us | 0.2711 us | 34.26 us |
View CleanForLoopContinue.lua
for idx = 1, 5 do repeat
print(1)
print(2)
print(3)
do break end -- goes to next iteration of for
print(4)
print(5)
until true end
View CanUseFsharpOptionFromCsharp.cs
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Microsoft.FSharp.Core;
namespace CanUseFsharpOptionFromCsharp
{
[TestClass]
public class CanUseFsharpOptionFromCsharp
{
[TestMethod]
View CanwriteReadOnlyReflection.cs
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace CanwriteReadOnlyReflection
{
[TestClass]
public class UnitTest1
{
public class TargetType
{
You can’t perform that action at this time.