Skip to content

Instantly share code, notes, and snippets.

View virzak's full-sized avatar

Victor Irzak virzak

View GitHub Profile
@davidfowl
davidfowl / dotnetlayout.md
Last active July 4, 2024 01:57
.NET project structure
$/
  artifacts/
  build/
  docs/
  lib/
  packages/
  samples/
  src/
 tests/
@trollixx
trollixx / sign-exe.sh
Created April 13, 2015 06:08
Signing Windows executables on Linux
#!/bin/bash
# Based on http://development.adaptris.net/users/lchan/blog/2013/06/07/signing-windows-installers-on-linux/
openssl pkcs12 -in $1 -nocerts -nodes -out .key.pem
openssl pkcs12 -in $1 -nokeys -nodes -out .cert.pem
openssl rsa -in .key.pem -outform DER -out .authenticode.key
openssl crl2pkcs7 -nocrl -certfile .cert.pem -outform DER -out .authenticode.spc
osslsigncode -spc .authenticode.spc -key .authenticode.key -t http://timestamp.verisign.com/scripts/timstamp.dll -in $2 -out $3
rm .key.pem .cert.pem .authenticode.key .authenticode.spc
@macromaniac
macromaniac / XHR.ts
Last active November 3, 2019 23:19
simple typescript xhr using promises
module XHR {
export class Header {
header: string;
data: string;
constructor(header: string, data: string) {
this.header = header;
this.data = data;
}
}
@juanca
juanca / github_load_all_diffs.js
Created March 2, 2017 18:42
Github PR bookmarklet: Load all file diffs
javascript:
document.querySelectorAll('.load-diff-button').forEach(node => node.click())
@mavasani
mavasani / DiagnosticSuppressorDesign.md
Last active September 4, 2019 00:57
DiagnosticSuppressor

Feature Request

dotnet/roslyn#30172: Programmatic suppression of warnings

Provide an ability for platform/library authors to author simple, context-aware compiler extensions to programmatically suppress specific instances of reported analyzer and/or compiler diagnostics, which are always known to be false positives in the context of the platform/library.

Programmatically Suppressible Diagnostic

An analyzer/compiler diagnostic would be considered a candidate for programmatic suppression if all of the following conditions hold:

  1. Not an error by default: Diagnostic's DefaultSeverity is not DiagnosticSeverity.Error.
@leppie
leppie / APL.cs
Last active March 9, 2020 03:00
unsafe class Program
{
delegate int? bar(int* i);
static void Main(string[] args)
{
int[] ω = {};
var Ʃ = 42;
int? Φ = null;
bar ϼ = default;
@okyrylchuk
okyrylchuk / Program.cs
Created January 19, 2022 23:18
Extensions GetEnumerator for foreach loops with Range type
foreach (int i in 3..5)
{
Console.WriteLine(i);
}
foreach (int i in ..3)
{
Console.WriteLine(i);
}