Skip to content

Instantly share code, notes, and snippets.

View JonDouglas's full-sized avatar
📦
Busy working on NuGet. I'll try my best to get around to you.

Jon Douglas JonDouglas

📦
Busy working on NuGet. I'll try my best to get around to you.
View GitHub Profile
using System.Reflection.Metadata;
using System.Reflection.PortableExecutable;
Console.WriteLine(IsNullableEnabledAtBuild(@"C:\Users\jaredpar\temp\console\bin\Debug\net7.0\console.dll", out var reason));
Console.WriteLine(reason);
static bool IsNullableEnabledAtBuild(string assemblyFilePath, out string? reason)
{
MetadataReaderProvider? pdbReaderProvider = null;
try
/*
* Copyright 2017 Google Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@jkubecki
jkubecki / ExportKindle.js
Last active February 25, 2024 00:45
Amazon Kindle Export
// The following data should be run in the console while viewing the page https://read.amazon.com/
// It will export a CSV file called "download" which can (and should) be renamed with a .csv extension
var db = openDatabase('K4W', '3', 'thedatabase', 1024 * 1024);
getAmazonCsv = function() {
// Set header for CSV export line - change this if you change the fields used
var csvData = "ASIN,Title,Authors,PurchaseDate\n";
db.transaction(function(tx) {
@JonDouglas
JonDouglas / xamarin-android-nuget-m2repository-issues.md
Last active April 23, 2020 15:48
xamarin-android-nuget-m2repository-issues
@JonDouglas
JonDouglas / xamarin-android-performance.md
Last active February 28, 2024 17:44
Xamarin Android Performance

Xamarin.Android Performance Issues

1. Investigation

One of the best ways to investigate a problematic Xamarin.Android Errors is to first ensure you have the proper tooling available:

  • Diagnostic MSBuild Output Enabled(Instructions)
  • Android SDK Installed
  • Android API Level Documentation
@brendanzagaeski
brendanzagaeski / Metadata.xml
Created December 22, 2015 23:44
Some Metadata.xml fixes for binding ADTECH Mobile (http://www.adtech.com/) in Xamarin.Android
<!-- This is an example of http://developer.xamarin.com/guides/android/advanced_topics/java_integration_overview/binding-a-java-library/troubleshooting-bindings/#Problem_Duplicate_custom_EventArgs_types
In this particular case, the conflicting definition is in
`Com.Adtech.Mobilesdk.Publisher.Vast.Player.ILinearAdPlayer`.
That interface also defines an "onError" method.
Error CS0102: The type
`Com.Adtech.Mobilesdk.Publisher.Vast.Player.ErrorEventArgs'
already contains a definition for `p0' -->
<attr path="/api/package[@name='com.adtech.mobilesdk.publisher.vast.player']/interface[@name='VideoPlayerListener']/method[@name='onError' and count(parameter)=1 and parameter[1][@type='java.lang.Exception']]" name="argsType">VideoPlayerListenerOnErrorArgs</attr>
@jmoody
jmoody / tmate-on-macOS.md
Last active February 25, 2024 00:50
tmate on macOS

Tmate is a remote tmux session over ssh.

Intall with Homebrew

$ brew update && brew upgrade
$ brew install tmux
$ brew install reattach-to-user-namespace
$ brew install tmate
Android Emulator usage: emulator [options] [-qemu args]
options:
-sysdir <dir> search for system disk images in <dir>
-system <file> read initial system image from <file>
-datadir <dir> write user data into <dir>
-kernel <file> use specific emulated kernel
-ramdisk <file> ramdisk image (default <system>/ramdisk.img
-image <file> obsolete, use -system <file> instead
-initdata <file> same as '-init-data <file>'
-data <file> data image (default <datadir>/userdata-qemu.img
@gabrielemariotti
gabrielemariotti / Readme.md
Last active March 2, 2024 23:10
A SimpleSectionedRecyclerViewAdapter: use this class to realize a simple sectioned `RecyclerView.Adapter`.

You can use this class to realize a simple sectioned RecyclerView.Adapter without changing your code.

The RecyclerView should use a LinearLayoutManager. You can use this code also with the TwoWayView with the ListLayoutManager (https://github.com/lucasr/twoway-view)

This is a porting of the class SimpleSectionedListAdapter provided by Google

Screen

Example: