Skip to content

Instantly share code, notes, and snippets.

View large's full-sized avatar
😀
Happy coding!

Lars Werner large

😀
Happy coding!
View GitHub Profile
@large
large / TcpProxy.cs
Created January 14, 2020 23:22 — forked from Mordo95/TcpProxy.cs
Asynchronous TCP proxy in C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Sockets;
using System.Text;
using System.Threading.Tasks;
namespace HolePunchTest
{
public class TcpProxy
@large
large / CrossPlatformTypeBinder.cs
Created April 5, 2020 12:34
Cross-platform Akka Remoting fix
public class CrossPlatformTypeBinder : DefaultSerializationBinder
{
static readonly bool isNetCore = Type.GetType("System.String, System.Private.CoreLib") != null;
readonly ConcurrentDictionary<string, Type> mappedTypes = new ConcurrentDictionary<string, Type>();
public override Type BindToType(string assemblyName, string typeName)
{
mappedTypes.TryGetValue(typeName, out var type);
if (type != null)
@large
large / hp_saap_license.txt
Created May 14, 2021 11:04 — forked from evianzhow/hp_saap_license.txt
HP Smart Array Advanced Pack Evaluation License Key
34T62-N84MB-7DQGY-G7XGT-YTQ63
@large
large / AuthorizeAttribute.cs
Created February 10, 2022 21:39
.Net 6 simplest web authentication ever for dot core
using System;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Filters;
namespace SomeApp.Authorization
{
@large
large / repo.xml
Last active March 17, 2022 23:41
Quickfix of Squeezebox server repro
<?xml version="1.0" encoding="UTF-8"?>
<extensions>
<details>
<title lang="EN">Michael's Slim Stuff (werner fix)</title>
</details>
<plugins>
<plugin name="Spotty" version="4.8.2" minTarget="7.7" maxTarget="*">
<title lang="EN">Spotify for Squeezebox. Still Spotty new version.</title>
@large
large / JSONMultiLanguage.cs
Created April 27, 2022 07:14
Simple class for Localizely.com JSON eksport files with cache
/////
///// Simple class to read JSON export files from Localizely
/////
//Add interface to program like so:
// services.AddSingleton<IJSONMultiLanguageInterface, JSONMultiLanguage>(
// l => new JSONMultiLanguage(Defaultlanguage: "NO", cache: l.GetService<IDistributedCache>())
// );
/////
///// Create a directory called {projectroot}/LanguageResources
@large
large / !howto.txt
Last active October 27, 2024 00:17
How to auto generate screenshots and frameit with translated text in your Flutter app
This document describes automation of screenshots creation of your multilanguage Flutter app.
Background:
-----------
I have an app with over 20 different languages and screenshotting all of them is time consuming.
At first I did it manually and over 7 days(!) went to drain to get it done.
20 x 6 screenshots x 3 devices = 360 pictures to handle
My setup is on a mac, so everything related is to that. Most developers who publish a iOS version, have access to a mac.