Skip to content

Instantly share code, notes, and snippets.

@smiranda
smiranda / 0_reuse_code.js
Last active August 29, 2015 14:14
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@smiranda
smiranda / docker-cleanup-resources.md
Created January 20, 2018 18:19 — 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

@smiranda
smiranda / nginxproxy.md
Created July 14, 2018 23:04 — forked from soheilhy/nginxproxy.md
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

@smiranda
smiranda / map-pallete.py
Created July 20, 2021 23:27
A script to map two color palletes using delta_e_cie2000
import sys
import itertools
import networkx as nx
from networkx.algorithms import bipartite
from colormath.color_objects import sRGBColor, LabColor
from colormath.color_conversions import convert_color
from colormath.color_diff import delta_e_cie2000
# References
# (1) About comparing colors with colormath: https://dev.to/tejeshreddy/color-difference-between-2-colours-using-python-182b