Skip to content

Instantly share code, notes, and snippets.

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

Anas KHABALI akhabali

🏠
Working from home
View GitHub Profile
@akhabali
akhabali / nginx.conf
Created December 27, 2019 14:47 — forked from Stanback/nginx.conf
Example Nginx configuration for adding cross-origin resource sharing (CORS) support to reverse proxied APIs
#
# CORS header support
#
# One way to use this is by placing it into a file called "cors_support"
# under your Nginx configuration directory and placing the following
# statement inside your **location** block(s):
#
# include cors_support;
#
# As of Nginx 1.7.5, add_header supports an "always" parameter which
@akhabali
akhabali / docker-cleanup-resources.md
Created November 8, 2018 09:50 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@akhabali
akhabali / share-azure-emulator-for-dev.bat
Last active June 28, 2017 09:37 — forked from jcdickinson/forward.bat
Share Azure Storage Emulator For Development Team
#1 Install the azure emulator with the default configuration
#2 Add port proxy to redirect connection to the azure local port
netsh interface portproxy add v4tov4 listenport=20000 connectaddress=127.0.0.1 connectport=10000 protocol=tcp
netsh interface portproxy add v4tov4 listenport=20001 connectaddress=127.0.0.1 connectport=10001 protocol=tcp
netsh interface portproxy add v4tov4 listenport=20002 connectaddress=127.0.0.1 connectport=10002 protocol=tcp
#3 use this connection string to connect remotely
REM DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;
REM AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;