Skip to content

Instantly share code, notes, and snippets.

View anuith's full-sized avatar
💭
Hello World

Nui Thiwakorn anuith

💭
Hello World
View GitHub Profile
@bouroo
bouroo / 60-sysctl.conf
Last active September 12, 2026 05:42
Kernel tuning for dedicated linux server. /etc/sysctl.d/60-sysctl.conf
################################################################################
# /etc/sysctl.d/60-sysctl.conf
#
# Purpose: Balanced kernel tuning for a general-purpose web + database server.
# Target: Modern Linux, kernel 5.x+ (Debian/Ubuntu/RHEL/SUSE derivatives).
# Workload: High-concurrency HTTP/API services AND PostgreSQL/MySQL on one host.
#
# Apply: sysctl --system
# Verify: sysctl --system 2>&1 # must print NO errors
# sysctl net.ipv4.tcp_congestion_control net.core.default_qdisc
using Android.Content;
using Android.Content.Res;
using Android.Graphics.Drawables;
using System;
using System.Threading.Tasks;
using YourProject.Droid.Renderers;
using Xamarin.Forms;
using Xamarin.Forms.Platform.Android;
[assembly: ExportRenderer(typeof(Button), typeof(CustomButtonRenderer))]
@rdingwall
rdingwall / FilterIPAttribute.cs
Created March 13, 2012 13:45
FilterIPAttribute for ASP.NET Web API (IIS only, port of MVC version from http://stackoverflow.com/a/4605086/91551)
using System;
using System.Configuration;
using System.Web;
using System.Web.Http;
using System.Web.Http.Controllers;
namespace Miscellaneous.Attributes.Controller
{
/// <summary>
/// Filter by IP address (ASP.NET Web API version)