Skip to content

Instantly share code, notes, and snippets.

View ShineSmile's full-sized avatar
I may be slow to respond.

Shine ShineSmile

I may be slow to respond.
View GitHub Profile
aessing / install-AzCopy.ps1
Last active October 4, 2023 14:15
Install AzCopy on Windows (PowerShell)
View install-AzCopy.ps1
# =============================================================================
# Install AzCopy on Windows (PowerShell)
# -----------------------------------------------------------------------------
# Developer.......: Andre Essing (
# (
# (
# (
# -----------------------------------------------------------------------------
avishayp / Dockerfile
Created September 25, 2018 19:02
Add non-root user for alpine linux
View Dockerfile
# non root user example for alpine
# usage:
# $ docker build --build-arg "USER=someuser" --tag test .
# $ docker run --rm test
FROM alpine
ARG USER=default
yougg /
Last active December 5, 2023 07:01
complete ways to set http/socks/ssh proxy environment variables

set http or socks proxy environment variables

# set http proxy
export http_proxy=http://PROXYHOST:PROXYPORT

# set http proxy with user and password

# set http proxy with user and password (with special characters)
euyuil / SetupWinRM.ps1
Created October 21, 2016 10:18
WinRM: Enable WinRM and create an HTTPS listener with self-signed certificate.
View SetupWinRM.ps1
Param ($DnsName)
$Cert = New-SelfSignedCertificate -CertStoreLocation Cert:\LocalMachine\My -DnsName $DnsName -Verbose
$Password = ConvertTo-SecureString -String $DnsName -Force -AsPlainText -Verbose
Export-Certificate -Cert $Cert -FilePath .\$DnsName.cer -Verbose
Export-PfxCertificate -Cert $Cert -FilePath .\$DnsName.pfx -Password $Password -Verbose
$CertThumbprint = $Cert.Thumbprint
sirsquidness / proxy.conf
Created September 22, 2016 12:42
How to have nginx proxy_pass follow upstream 302 redirects (eg, when you're running a steam cache and you're behind Cox's layer 7 interception stuff)
View proxy.conf
# This config came around after a friend had problems with a Steam cache on his
# Cox internet connection. Cox would intercept any requests to Steam content
# servers and return a 302 to Cox's servers. The cache would return the 302
# to the Steam client, and the Steam client would go directly to Cox, bypassing
# the cache.
# This config makes nginx follow the 302 itself, and caches the result of the
# redirect as if it was the response to the original request. So subsequent
# requests to the URL that returned a 302 will get the file instead of a 302.
JonCole /
Last active November 7, 2023 09:50
Redis Best Practices

Some of the Redis best practices content has moved

This content from this markdown file has moved a new, happier home where it can serve more people. Please check it out :

NOTE: Client specific guidance listed below is still valid and should still be considered. I will update this document once all content has been moved.

JonCole /
Last active October 22, 2019 17:28
fipar / mongodb.json
Last active November 10, 2020 05:44
Basic Grafana dashboard for MongoDB metrics (data source:
View mongodb.json
"id": 1,
"title": "MongoDB",
"originalTitle": "MongoDB",
"tags": [],
"style": "dark",
"timezone": "browser",
"editable": true,
"hideControls": false,
"sharedCrosshair": false,
nicktoumpelis /
Created April 23, 2014 13:00
Cleans and resets a git repo and its submodules
git clean -xfd
git submodule foreach --recursive git clean -xfd
git reset --hard
git submodule foreach --recursive git reset --hard
git submodule update --init --recursive
denji /
Last active December 5, 2023 16:26
NGINX tuning for best performance

Moved to git repository:

NGINX Tuning For Best Performance

For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.

Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.

You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.