Skip to content

Instantly share code, notes, and snippets.

View JPVenson's full-sized avatar
🎁
Focusing

JPVenson JPVenson

🎁
Focusing
View GitHub Profile

Whitepaper on Testing methodology for the Scripts and Tools

This whitepaper is aiming to provide a common bases for evaluating the systems performance of a device and submit the data to the centralized HWA-Server. The goal is to provide all nessesary informations on how to obtain test data, process them and submit them in a shared way so that multiple implementations made over different systems may all create shared results.

Version

  • 0.00 Draft, 06.02.2024, JPVenson

Abstract

@JPVenson
JPVenson / docs.md
Last active July 19, 2023 13:03
cleanup collections.xml for jellyfin

BEFORE YOU START: BACKUP YOUR CONFIGURATION. YOU. HAVE. BEEN. WARNED!

This is the Cs version of the script posted by michaelkrieger at jellyfin/jellyfin#1907 (comment) to cleanup the collection.xml for missing link entires.

Linux Host

To run this on linus, ensure you have a dotnet version installed.
https://learn.microsoft.com/en-us/dotnet/core/install/linux
or for the most part, this oneliner will install dotnet on your system:

//CS Blazor WebAssembly Part:
public static class FileUtil
{
public static IEnumerable<List<T>> Partition<T>(this IList<T> source, Int32 size)
{
for (int i = 0; i < Math.Ceiling(source.Count / (Double) size); i++)
{
yield return new List<T>(source.Skip(size * i).Take(size));
}
}

The Skills Poor Programmers Lack

A friend and I had a discussion about the basic skills that are often lacking in experienced programmers. How can a programmer work for ten or twenty years and never learn to write good code? So often they need close supervision to ensure they go down the right path, and they can never be trusted to take technical leadership on larger tasks. It seems they are just good enough to get by in their job, but they never become effective.

We thought about our experiences and came up with three fundamental skills that we find are most often missing. Note that these are not skills which take a considerable amount of talent or unique insight. Nor are they "trends" or "frameworks" to help you get a new job. They are basic fundamentals which are prerequisites to being a successful programmer.

Understand how the language works

Programmers cannot write good code unless they understand what they are typing. At the most basic level, this means they need to understand the rules of

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using JPB.DataAccess.Manager;
using JPB.DataAccess.Tests.TestFramework;
using NUnit.Framework;
using NUnit.Framework.Internal;
This file has been truncated, but you can view the full file.
Mon, 08 Jan 2018 06:32:49 GMT
Connecting to host h2602619.stratoserver.net, port 5201
Reverse mode, remote host h2602619.stratoserver.net is sending
[ 5] local 192.168.178.21 port 51933 connected to 81.169.212.86 port 5201
[ ID] Interval Transfer Bandwidth
[ 5] 0.00-1.00 sec 8.41 MBytes 70.5 Mbits/sec
[ 5] 1.00-2.00 sec 9.97 MBytes 83.7 Mbits/sec
[ 5] 2.00-3.00 sec 9.89 MBytes 82.9 Mbits/sec
[ 5] 3.00-4.00 sec 9.88 MBytes 82.9 Mbits/sec
[ 5] 4.00-5.00 sec 9.61 MBytes 80.6 Mbits/sec
"AppWorkshop"
{
"appid" "289070"
"SizeOnDisk" "406829"
"NeedsUpdate" "0"
"NeedsDownload" "0"
"TimeLastUpdated" "1517698998"
"TimeLastAppRan" "1517698383"
"WorkshopItemsInstalled"
{
using System;
using System.Collections;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;
using Xunit;
public abstract class NotifyPropertyChanged
{
public string GetPropertyName(Expression<Func<object>> propertyExpression)
{
var unaryExpression = propertyExpression.Body as UnaryExpression;
var memberExpression = unaryExpression == null ? (MemberExpression)propertyExpression.Body : (MemberExpression)unaryExpression.Operand;
var propertyName = memberExpression.Member.Name;
return propertyName;
}
}
using System;
using System.IO;
using System.Linq;
using System.Text;
namespace JPB.PersonalWebpage.Helper
{
public class Minify
{
private static Encoding DefaultEncoding(Encoding encoding)