Skip to content

Instantly share code, notes, and snippets.

View beeradmoore's full-sized avatar

Brad beeradmoore

View GitHub Profile
@beeradmoore
beeradmoore / parse_dll_info.cs
Created January 15, 2023 05:02
Parse DLL info and output as CSV. Made to look at data of DLSS dlls.
var dlssPath = "S:\\Dump\\DLSS\\DLSS zips\\";
var dlssFiles = Directory.GetFiles(dlssPath, "*.dll", SearchOption.AllDirectories);
var stringBuilder = new StringBuilder();
stringBuilder.AppendLine("Comments,CompanyName,FileBuildPart,FileDescription,FileMajorPart,FileMinorPart,FileName,FilePrivatePart,FileVersion,InternalName,IsDebug,IsPatched,IsPrivateBuild,IsPreRelease,IsSpecialBuild,Language,LegalCopyright,LegalTrademarks,OriginalFilename,PrivateBuild,ProductBuildPart,ProductMajorPart,ProductMinorPart,ProductName,ProductPrivatePart,ProductVersion,SpecialBuild");
foreach (var dlssFile in dlssFiles)
{
var fileVersionInfo = FileVersionInfo.GetVersionInfo(dlssFile);
stringBuilder.AppendLine($"{fileVersionInfo.Comments},{fileVersionInfo.CompanyName},{fileVersionInfo.FileBuildPart},{fileVersionInfo.FileDescription},{fileVersionInfo.FileMajorPart},{fileVersionInfo.FileMinorPart},{fileVersionInfo.FileName},{fileVersionInfo.FilePrivatePart},\"{fileVersionInfo.FileVersion}\",{fileVersionInfo.InternalName},{fil
@beeradmoore
beeradmoore / configuration.yaml
Created January 7, 2023 06:32
Home Assistant config for ANKO HEGSM40 fan running Tasmota
# bedroom fan
mqtt:
fan:
- name: "Bedroom Fan"
unique_id: "bedroom_fan"
device: { "identifiers": "tasmota bedroom fan", "suggested_area": "Bedroom" }
command_topic: "cmnd/tasmota_743BE6/POWER"
state_topic: "stat/tasmota_743BE6/POWER"
percentage_command_topic: "cmnd/tasmota_743BE6/TuyaSend4"
percentage_command_template: "{{ {1: '3,0', 2: '3,1', 3: '3,2', 4: '3,3', 5: '3,4', 6: '3,5', 7: '3,6', 8: '3,7'}[value] | default('1') }}"
@beeradmoore
beeradmoore / select-xamarin-sdk-v2.sh
Created December 19, 2021 02:34
Output of `cat $VM_ASSETS/select-xamarin-sdk-v2.sh` on a macos-11 github action runner (19th Dec 2021)
#!/bin/bash -e -o pipefail
# Select any Xamarin SDK versions as the default ones independently by specifying only those versions that need to be changed.
# Examples:
# 1. Change all versions: $VM_ASSETS/select-xamarin-sdkv-v2.sh --mono=6.12 --ios=14.8 --android=10.2 --mac=7.8
# 2. Change default Mono and iOS only: $VM_ASSETS/select-xamarin-sdkv-v2.sh --mono=6.12 --ios=14.8
# 3. Change default Android only: $VM_ASSETS/select-xamarin-sdkv-v2.sh --android=11.1
get_framework_path() {
case $1 in
@beeradmoore
beeradmoore / wp-json.json
Created August 15, 2021 07:57
Onewheel Endpoints
{
"namespace": "fm\/v2",
"routes": {
"\/fm\/v2": {
"namespace": "fm\/v2",
"methods": [
"GET"
],
"endpoints": [
{
@beeradmoore
beeradmoore / techpowerup_dlss_dll_hashes.json
Last active October 12, 2021 02:44
File used by DLSS Swapper to confirm hashes of local zips downloaded from TechPowerUp.
[
{
"version": "2.3.1.0",
"version_number": 562962838323200,
"sha1": "5DFCD91E351105803AA64C4EA64E4A89A1A9AE29",
"md5": "0FC1727AD4A52C29E2897567008B3407"
},
{
"version": "2.3.0.0",
"version_number": 562962838323200,
@beeradmoore
beeradmoore / FileHelper.cs
Created October 28, 2019 03:15 — forked from IlyaLavrov97/FileHelper.cs
Real Path Hepler class for Xamarin.Android, works for API 21+.
using Android.Content;
using Android.Database;
using Android.OS;
using Android.Provider;
using Android.Text;
using Java.IO;
using System;
using System.IO;
using System.Threading.Tasks;
@beeradmoore
beeradmoore / gist:2c2ad033e28b7eece6d404be997e7c69
Created August 16, 2019 08:14
syncfusion android crash stacktrace
JniEnvironment+InstanceMethods.CallFloatMethod (Java.Interop.JniObjectReference instance, Java.Interop.JniMethodInfo method, Java.Interop.JniArgumentValue* args)
JniPeerMembers+JniInstanceMethods.InvokeVirtualSingleMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters)
TypedArray.GetFloat (System.Int32 index, System.Single defValue)
SfCircularGauge.CircularGaugeRangeProperties (Android.Content.Res.TypedArray styledAttrs, Com.Syncfusion.Gauges.SfCircularGauge.CircularRange range)
SfCircularGauge.CircularGaugeAttributes (Android.Content.Context context, Android.Util.IAttributeSet attributes, System.Int32 styleAttributes, System.Int32 styleRes)
Com.Syncfusion.Gauges.SfCircularGauge.SfCircularGauge..ctor (Android.Content.Context context, Android.Util.IAttributeSet attrs) [0x0006f] in <3e4ee8b6b76a4b7c92ca8f0b4916e880>:0
Com.Syncfusion.Gauges.SfCircularGauge.SfCircularGauge..ctor (Android.Content.Context context) [0x00000] in <3e4ee8b6b76a4b7c92ca8f0b4916e8
@beeradmoore
beeradmoore / download_latest_minecraft.php
Created April 19, 2019 05:23
Downloads the latest version of Minecraft jars.
<?php
echo "Downloading manifest.\n";
$manifest = json_decode(file_get_contents('https://launchermeta.mojang.com/mc/game/version_manifest.json'), true);
$error = json_last_error();
if ($error != JSON_ERROR_NONE)
{
echo "ERROR: Could not parse manifest json, $error\n";
exit;
}
#!/bin/sh
# Based on gist.github.com/gboudreau/install-ffmpeg-amazon-linux.sh
# and https://trac.ffmpeg.org/wiki/CompilationGuide/Centos
if [ "`/usr/bin/whoami`" != "root" ]; then
echo "You need to execute this script as root."
exit 1
fi
cat > /etc/yum.repos.d/centos.repo<<EOF
@beeradmoore
beeradmoore / ec2_availability_zones.json
Created November 1, 2017 11:29
List of all current availability zones.
{"ap-south-1":["ap-south-1a","ap-south-1b"],"eu-west-2":["eu-west-2a","eu-west-2b"],"eu-west-1":["eu-west-1a","eu-west-1b","eu-west-1c"],"ap-northeast-2":["ap-northeast-2a","ap-northeast-2c"],"ap-northeast-1":["ap-northeast-1a","ap-northeast-1c"],"sa-east-1":["sa-east-1a","sa-east-1b","sa-east-1c"],"ca-central-1":["ca-central-1a","ca-central-1b"],"ap-southeast-1":["ap-southeast-1a","ap-southeast-1b"],"ap-southeast-2":["ap-southeast-2a","ap-southeast-2b","ap-southeast-2c"],"eu-central-1":["eu-central-1a","eu-central-1b","eu-central-1c"],"us-east-1":["us-east-1a","us-east-1b","us-east-1c","us-east-1d","us-east-1e","us-east-1f"],"us-east-2":["us-east-2a","us-east-2b","us-east-2c"],"us-west-1":["us-west-1a","us-west-1c"],"us-west-2":["us-west-2a","us-west-2b","us-west-2c"]}