insttall:
sudo apt install xorg
sudo apt instal firefox-esr
launch:
sudo xinit firefox $* -- :1
then somehow change x-server params
brew install duti | |
duti -s org.vim.MacVim public.plain-text all | |
duti -s org.vim.MacVim public.data all | |
# no need to reboot |
insttall:
sudo apt install xorg
sudo apt instal firefox-esr
launch:
sudo xinit firefox $* -- :1
then somehow change x-server params
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS tools-install | |
RUN dotnet tool install --tool-path /dotnetcore-tools dotnet-sos | |
RUN dotnet tool install --tool-path /dotnetcore-tools dotnet-trace | |
RUN dotnet tool install --tool-path /dotnetcore-tools dotnet-dump | |
RUN dotnet tool install --tool-path /dotnetcore-tools dotnet-counters | |
FROM {your-image-location-and-name:1.1.1-release-1.0.0} | |
USER 0 |
#!/bin/bash | |
# | |
# Prune local tracking branches that have been removed upstream. | |
# Your remote tracking branches can be removed automatically by setting `fetch.prune` to true or running `git fetch -prune`. | |
# Another command to clean up your remote tracking branches is `git remote prune <remote>`. | |
# | |
# Author: @leshill | |
# https://gist.github.com/leshill/9a1088a17f94cef24831 | |
if [[ $# = 1 && $1 == '-n' ]]; then |
#!/bin/bash | |
#split csv file with header into separate files based on key column (input should be sorted by key column) | |
if [ $# -eq 0 ]; then | |
echo "Usage: $0 <input_csv_file>" | |
exit 1 | |
fi | |
INPUT_CSV="$1" |
┌──count()─┐ | |
│ 11849659 │ | |
└──────────┘ |
using System.Buffers; | |
using BenchmarkDotNet.Attributes; | |
using BenchmarkDotNet.Running; | |
public class Program | |
{ | |
private static void Main(string[] args) | |
{ | |
var summary = BenchmarkRunner.Run<PoolBench>(); | |
} |
using System; | |
BadMethod(1,2); | |
BadMethod(2,1); // bang! | |
GoodMethod(2,1); // tadam | |
var uid = (UserId)1; | |
var accid = (AccountId)2; |
/* | |
SharpLab tools in Run mode: | |
• value.Inspect() | |
• Inspect.Heap(object) | |
• Inspect.Stack(value) | |
• Inspect.MemoryGraph(value1, value2, …) | |
*/ | |
using System; | |
using System.Runtime.InteropServices; | |
using System; | |
using System.Collections.Concurrent; | |
using System.Diagnostics; | |
public static class Program | |
{ | |
public static Func<T, V> MemoizeExt<T, V>(this Func<T, V> f) => a => | |
new ConcurrentDictionary<T, V>().GetOrAdd(a, f); | |
public static Func<T, V> Memoize<T, V>(Func<T, V> f) => a => |