Skip to content

Instantly share code, notes, and snippets.

@eduardosilva
eduardosilva / docker-help.md
Created August 30, 2018 10:46 — forked from bradtraversy/docker-help.md
Docker Commands, Help & Tips

Docker Commands, Help & Tips

Show commands & management commands

$ docker

Docker version info

@eduardosilva
eduardosilva / datediff.js
Created September 13, 2019 17:13 — forked from svetoslavovm/datediff.js
JavaScript: DateDiff & DateMeasure: Calculate days, hours, minutes, seconds between two Dates
(function() {
function DateDiff(date1, date2) {
this.days = null;
this.hours = null;
this.minutes = null;
this.seconds = null;
this.date1 = date1;
this.date2 = date2;
@eduardosilva
eduardosilva / pre-push-(dotnet).sh
Last active April 28, 2022 13:31 — forked from johncmunson/prepare-commit-msg.sh
Some useful git hooks
#!/bin/bash
protected_branch='master'
current_branch=$(git symbolic-ref HEAD | sed -e 's,.*/\(.*\),\1,')
RED='\033[0;31m'
GREEN='\033[1;32m'
YELLOW='\033[1;33m'
NC='\033[0m' # No Color
# only run this if you are pushing to master
if [[ $current_branch = $protected_branch ]] ; then
@eduardosilva
eduardosilva / High_Performance_Redis.md
Created November 29, 2023 20:25 — forked from neomantra/High_Performance_Redis.md
Notes on running Redis with HPC techniques

High Performance Redis

In response to this brief blog entry, @antirez tweeted for some documentation on high-performance techniques for Redis. What I present here are general high-performance computing (HPC) techniques. The examples are oriented to Redis. but they work well for any program designed to be single- or worker-threaded and asynchronous (e.g. uses epoll).

The motivation for using these techniques is to maximize performance of our system and services. By isolating work, controlling memory, and other tuning, you can achieve significant reduction in latency and increase in throughput.

My perspective comes from the microcosm of my own bare-metal (vs VM), on-premises deployment. It might not be suitable for all scenarios, especially cloud deployments, as I have little experience with HPC there. After some discussion, maybe this can be adapted as [redis.io documentation](https://redis.io/do