Skip to content

Instantly share code, notes, and snippets.

View idubnori's full-sized avatar

idubnori

  • Tokyo, Japan
  • 21:22 (UTC +09:00)
View GitHub Profile
@othyn
othyn / guide.md
Last active October 6, 2025 20:40
Fix horrendously bad macOS (12.3.1 tested) SMB (Samba) performance on Unraid

Intro

Out of the box, my SMB performance on macOS 12.3.1 would top out at around 20MB/s in short ~5 second bursts, which was absolutely horrendous, slow to navigate in Finder and slugish to interact with.

Since making these changes, I now get sustained ~80-100MB/s+ and instant Finder navigation which is superb and how things should be out-of-the-box (OOTB)!

May 2023 update: As of Ventura, the SMB issues were just horribly inconsistent and hard to maintain. Something in the combination of Unraid, macOS and SMB just doesn't play nice. I ended up binning NFS/SMB all together and heading to a locally hosted Nextcloud instance for file syncing, then using SFTP/Ansible Git flow for editing files within appdata.

Sources

@pleshakov
pleshakov / README.md
Created June 13, 2019 11:52
NGINX Plus Ingress Controller with custom annotations for sticky learn session persistence with sessions sharing among multiple IC replicas.

Description

This demo shows how to enable sticky learn session persistence for an Ingress resource with the sessions shared among multiple NGINX Plus Ingress Controller pods.

Setup

  1. Deploy the Ingress Controller as a deployment -- https://github.com/nginxinc/kubernetes-ingress/blob/master/docs/installation.md
  2. Deploy a headless service for the Ingress Controller that will be used for zone synchronization:

$ kubectl apply -f nginx-ingress-zonesync.yaml

anonymous
anonymous / firewall.user
Created May 29, 2017 18:22
OpenWrt map-e (JPNE v6plus) において、割当ポート240個をちゃんと使わせるための設定。
## /etc/firewall.user
# This file is interpreted as shell script.
# Put your custom iptables rules here, they will
# be executed with each firewall (re-)start.
# Internal uci firewall chains are flushed and recreated on reload, so
# put custom rules into the root chains e.g. INPUT or FORWARD or into the
# special user chains, e.g. input_wan_rule or postrouting_lan_rule.
@mthrynn
mthrynn / OSX_TCP_options.command
Last active June 3, 2024 15:56 — forked from Zillionx/OSX_TCP_options.command
OSX - Tuning the Network Stack TCP
## Quick fix for slow internet after update to OSX 10.11 "El Capitan"
## Changes are not permanent, just restart your mac if it doesn't work.
## write config
sudo su -
sysctl -w net.inet.tcp.doautorcvbuf=0
sysctl -w net.inet.tcp.doautosndbuf=0
sysctl -w net.inet.tcp.win_scale_factor=0
sysctl -w kern.ipc.somaxconn=2048
sysctl -w net.inet.tcp.rfc1323=1
$token = '<API_Token>'
$headers = @{
"Authorization" = "Bearer $token"
"Content-type" = "application/json"
}
$body = @{
accountName="<Your_account>"
projectSlug="<Your_project_slug>"
@rionmonster
rionmonster / IQueryableExtensions
Last active November 9, 2022 16:39
Resolve the SQL being executed behind the scenes in Entity Framework Core
public static class IQueryableExtensions
{
private static readonly TypeInfo QueryCompilerTypeInfo = typeof(QueryCompiler).GetTypeInfo();
private static readonly FieldInfo QueryCompilerField = typeof(EntityQueryProvider).GetTypeInfo().DeclaredFields.First(x => x.Name == "_queryCompiler");
private static readonly PropertyInfo NodeTypeProviderField = QueryCompilerTypeInfo.DeclaredProperties.Single(x => x.Name == "NodeTypeProvider");
private static readonly MethodInfo CreateQueryParserMethod = QueryCompilerTypeInfo.DeclaredMethods.First(x => x.Name == "CreateQueryParser");
PROPOSED DICOM Delete REST API ( cdrs - Custom DICOM RS )
To Delete Study:
DELETE http://localhost/cdrs/studies/1.2.826.0.1.3680043.6.7026.5202.20150315133048.160.2/
To force-delete Study:
POST http://localhost/cdrs/studies/1.2.826.0.1.3680043.6.7026.5202.20150315133048.160.2/$force_delete
To Delete Series:
DELETE http://localhost/cdrs/studies/1.2.826.0.1.3680043.6.7026.5202.20150315133048.160.2/series/1.2.826.0.1.3680043.6.5932.1974.20150315133048.160.3/
@gBritz
gBritz / FlurlTesting.cs
Created March 4, 2016 18:58
Testing Flurl with TestServer
public static async Task WriteAsync(this IOwinContext context, string content, IDictionary<string, string> headers = null)
{
foreach (var header in headers)
{
context.Response.Headers.Add(header.Key, new[] { header.Value });
}
await context.Response.WriteAsync(content);
}
@superjamie
superjamie / raspberry-pi-vpn-router.md
Last active October 6, 2025 20:22
Raspberry Pi VPN Router

Raspberry Pi VPN Router

This is a quick-and-dirty guide to setting up a Raspberry Pi as a "router on a stick" to PrivateInternetAccess VPN.

Requirements

Install Raspbian Jessie (2016-05-27-raspbian-jessie.img) to your Pi's sdcard.

Use the Raspberry Pi Configuration tool or sudo raspi-config to: