Skip to content

Instantly share code, notes, and snippets.

View andreinitescu's full-sized avatar

Andrei Nitescu andreinitescu

View GitHub Profile
/// <summary>
/// A hash combiner that is implemented with the Fowler/Noll/Vo algorithm (FNV-1a). This is a mutable struct for performance reasons.
/// Taken from https://gist.github.com/StephenCleary/4f6568e5ab5bee7845943fdaef8426d2
/// </summary>
public struct FnvHash
{
/// <summary>
/// The starting point of the FNV hash.
/// </summary>
public const ulong Offset = 14695981039346656037;
@muff-in
muff-in / resources.md
Last active April 27, 2024 22:37
A curated list of Assembly Language / Reversing / Malware Analysis / Game Hacking-resources
@richlander
richlander / share-the-love.md
Last active July 20, 2021 16:53
.NET Core 3.0 -- Post Launch Blog Posts

.NET Core 3.0 -- Post Launch Blog Posts

We launched .NET Core 3.0! Go team! The super official blog post covered a lot of features, but none of them at depth. Many people will want to learn more about specific scenarios at features at much greater depth, with more guidance and better code samples.

The following is a list of proposed posts (with descriptive but prelimary titles) for us to write and publish during the rest of 2019.

Note: This tweet also has feedback.

Getting Started

@madskristensen
madskristensen / VSIX-Checklist.md
Last active August 6, 2023 13:07
VS extension checklist

Visual Studio Extensibility Checklist

Here is a list of things to make sure to remember before publishing your Visual Studio extension.

Adhere to threading rules

Add the Microsoft.VisualStudio.SDK.Analyzers NuGet package to your VSIX project, which will help you discover and fix common violations of best practices regarding threading.

Add high-quality icon

All extensions should have an icon associated with it. Make sure the icon is a high-quality .png file with the size 90x90 pixels in 96 DPI or more. After adding the icon to your VSIX project, register it in the .vsixmanifest file as both the Icon and Preview image.

Name and description

@thongdoan
thongdoan / StatementBuilder.cs
Last active June 14, 2017 18:09
Sqlite.Net Delete, Update, Insert helper
//Thanks to https://github.com/praeclarum/sqlite-net
public static class SQLiteExtension
{
public static StatementBuilder<T> CreateStatement<T>(this SQLiteConnection conn)
{
return new StatementBuilder<T>(conn);
}
}
@veryhumble
veryhumble / RecyclerViewAdapter.cs
Last active August 5, 2021 19:13
Xamarin.Forms RecyclerView Renderer for Android
using System.Collections;
using System.Diagnostics;
using A11YGuide.Controls;
using A11YGuide.Droid.Helpers;
using A11YGuide.ViewModels.Search;
using Android.Support.V7.Widget;
using Android.Views;
using Android.Widget;
using fivenine.Core.Extensions;
using Xamarin.Forms;
@paveleremin
paveleremin / Cisco.vbs
Created February 24, 2017 06:45
Cisco AnyConnect: save password
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run """%PROGRAMFILES(x86)%\Cisco\Cisco AnyConnect Secure Mobility Client\vpnui.exe"""
WScript.Sleep 1500
WshShell.AppActivate "Cisco AnyConnect Secure Mobility Client"
WshShell.SendKeys "{TAB}"
WshShell.SendKeys "{TAB}"
@rasmuschristensen
rasmuschristensen / AutoREST PS
Created December 9, 2016 22:29
A Powershell to autogenerate C# proxies from a swagger endpoint
$swaggerEndpoint = "http://localhost:9000/swagger/docs/v1"
$outputDirectory = "targetfolder"
$autoRestRelativePath = "..\..\packages\autorest.0.17.3\tools\AutoRest.exe"
& $autoRestRelativePath -Input $swaggerEndpoint -Namespace "com.myproject.Client.Proxies.targetfolder" -OutputDirectory $outputDirectory -CodeGenerator CSharp
@treku
treku / gist:67f5e6dab16fe63e6d59d1f6e51cf55f
Created November 27, 2016 22:31
A bit about SOLID in C#
1) A must watch:
Bob Martin SOLID Principles of Object Oriented and Agile Design
https://www.youtube.com/watch?v=TMuno5RZNeE
2) Then...
Applying S.O.L.I.D. Principles in .NET/C#
https://www.youtube.com/watch?v=gwIS9cZlrhk
3) And then a bit of articles:
https://johnlnelson.com/2014/07/20/solid-design-principles/