Skip to content

Instantly share code, notes, and snippets.

View aRmanNM's full-sized avatar
🏠
Working from home

Arman Naeimi aRmanNM

🏠
Working from home
View GitHub Profile
**EU Server scripts**
apt-get update -y && apt-get upgrade -y
apt install curl -y
bash <(curl -Ls https://raw.githubusercontent.com/vaxilu/x-ui/master/install.sh)
--------------------------------------------------------------
**Iran Server scripts**
@Azaferany
Azaferany / Configuring ALL HttpClients named or unnamed
Last active July 17, 2022 11:03
add handler to all http client (Configuring ALL HttpClients named or unnamed)
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Http;
using Microsoft.Extensions.Options;
using Polly;
using Prometheus;
var services = new ServiceCollection();
services.AddSingleton<IHttpMessageHandlerBuilderFilter, DefaultHttpMessageHandlerBuilderFilter>();
@rickyah
rickyah / dotnet-format-action.yml
Created July 25, 2020 08:24
Runs dotnet-format on every PR and create a commit that fixes the formatting if it doesn't comply with your code convention
name: Format check on pull request
on: pull_request
jobs:
dotnet-format:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/[email protected]
with:
fetch-depth: 0
@joe-scalise
joe-scalise / profiles.json
Last active December 6, 2020 02:54
Windows Terminal w/Nord Color Scheme and Example Custom Profile
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
// Use New-Guid for creating custom profiles
// https://github.com/microsoft/terminal/blob/master/doc/cascadia/SettingsSchema.md
{
"$schema": "https://aka.ms/terminal-profiles-schema",
@amrza
amrza / aria.sh
Created April 21, 2018 15:50
Download List of files with aria2
#!/bin/sh
aria2c --dir=./ --input-file=urls.txt --max-concurrent-downloads=1 --connect-timeout=60 --max-connection-per-server=16 --split=16 --min-split-size=1M --human-readable=true --download-result=full --file-allocation=none
date
# Now create this file in the same directory and paste all urls in it: urls.txt
@simonw
simonw / how-to.md
Last active April 16, 2025 15:21
How to create a tarball of a git repository using "git archive"
@jpoehls
jpoehls / get_modelstate_errors.cs
Created March 28, 2012 20:30
Get dictionary of errors from ModelState in ASP.NET MVC
var errorList = ModelState
.Where(x => x.Value.Errors.Count > 0)
.ToDictionary(
kvp => kvp.Key,
kvp => kvp.Value.Errors.Select(e => e.ErrorMessage).ToArray()
);