type: PIN
Consumer key: 3nVuSoBZnx6U4vzUxf5w
Consumer secret: Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys
type: PIN
Consumer key: IQKbtAYlXLripLGPWd0HUA
# ------------------------------------------------ | |
# Config files are located in /etc/wireguard/wg0 | |
# ------------------------------------------------ | |
# ---------- Server Config ---------- | |
[Interface] | |
Address = 10.10.0.1/24 # IPV4 CIDR | |
Address = fd86:ea04:1111::1/64 # IPV6 CIDR | |
PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE; ip6tables -A FORWARD -i wg0 -j ACCEPT; ip6tables -t nat -A POSTROUTING -o eth0 -j MASQUERADE # Add forwarding when VPN is started | |
PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE; ip6tables -D FORWARD -i wg0 -j ACCEPT; ip6tables -t nat -D POSTROUTING -o eth0 -j MASQUERADE # Remove forwarding when VPN is shutdown |
<Project> | |
<ItemGroup> | |
<Solution Include="*.sln" /> | |
<PublishProject Include="XXX.Mvc\XXX.Mvc.csproj" /> | |
<TestProject Include="**\*.Test*.*proj" Exclude="XXX.Tests.Shared\XXX.Tests.Shared.csproj" /> | |
</ItemGroup> | |
<Target Name="Build"> | |
<MSBuild Projects="@(Solution)" Targets="Restore" ContinueOnError="ErrorAndStop" UnloadProjectsOnCompletion="true" UseResultsCache="false" /> | |
<MSBuild Projects="@(PublishProject)" Targets="Publish" Properties="Configuration=Release" ContinueOnError="ErrorAndContinue" /> |
This is an example on how to use WPF and F# to do a simple physics game using Verlet Integration.
The program creates a system of particles and constraints. Particles have inertia and is affected by gravity but their motion is also contrained by the constraints.
You control the ship by firing rockets attached to the ship. Use the arrow keys to fire the rockets.
I tried to annotate the source code to help guide a developer familiar with languages like C#. If you have suggestions for how to improve it please leave a comment below.
Application logging is ubiquitous and invaluable for troubleshooting. Structured logging enables you to log formatted messages and the data fields separately so that you can see the messages but also filter on the data fields. Tracing takes this a step further, where you can correlate many log entries together as you follow a trace of execution through an application. Traces also include additional information about the execution process, such as the sequence of calls to dependencies and how long any given call may take.
Application Insights lets you see all of this data correlated together in an application. You can search for an error log and then see in the execution flow that the log entry was added right after a failed call to another service. Or you can see that a certain web request is slower than others because it spends a lot of time on many redundant data access calls.
using System; | |
using System.Threading.Tasks; | |
namespace System.Collections.Concurrent | |
{ | |
public static class ConcurrentDictionaryExtensions | |
{ | |
/// <summary> | |
/// Provides an alternative to <see cref="ConcurrentDictionary{TKey, TValue}.GetOrAdd(TKey, Func{TKey, TValue})"/> that disposes values that implement <see cref="IDisposable"/>. | |
/// </summary> |
$ brew install podman
open System | |
type Interval = | |
| PerfectUnison | |
| MinorSecond | |
| MajorSecond | |
| MinorThird | AugmentedSecond // Enharmonically the same in 12TET | |
| MajorThird | |
| PerfectFourth | |
| DiminishedFifth | AugmentedFourth // Enharmonically the same in 12TET |
module Demo.HashRings | |
open System | |
open System.Collections.Generic | |
/// Range is a tuple describing (s,e] - where `s` is start | |
/// (exclusive) index, while `e` is end (inclusive) index. | |
type Range = ValueTuple<int,int> | |
[<RequireQualifiedAccess>] |
module Example | |
open Fable.Core | |
open Fable.Core.JsInterop | |
open Msal | |
open Configuration | |
open Account | |
open System.Collections.Generic | |
module private Internal = |