Name | |||||||
---|---|---|---|---|---|---|---|
L1 cache reference | 0.5 | ns | |||||
Branch mispredict | 5 | ns | |||||
L2 cachereference | 7 | ns | 14x L1 cache | ||||
Mutex lock/unlock | 25 | ns | |||||
Main memory reference | 100 | ns | 20x L2 cache, 200x L1 cache | ||||
Compress 1K bytes with Zippy | 3,000 | ns | 3 | us |
The always enthusiastic and knowledgeable mr. @jasaltvik shared with our team an article on writing (good) Git commit messages: How to Write a Git Commit Message. This excellent article explains why good Git commit messages are important, and explains what constitutes a good commit message. I wholeheartedly agree with what @cbeams writes in his article. (Have you read it yet? If not, go read it now. I'll wait.) It's sensible stuff. So I decided to start following the
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//! A doubly-linked list in 50 LOCs of stable and safe Rust. | |
// Backup-fork of https://play.rust-lang.org/?gist=c3db81ec94bf231b721ef483f58deb35 | |
use std::cell::RefCell; | |
use std::rc::{Rc, Weak}; | |
use std::fmt::Display; | |
// The node type stores the data and two pointers. | |
// | |
// It uses Option to represent nullability in safe Rust. It has zero overhead | |
// over a null pointer due to the NonZero optimization. |
Installing different versions of open jdk through Homebrew(assuming already installed) and already having Java 8.
We need to install a tool called jenv - Java version manager which is similar to nvm(nodeJs version manager).
brew install jenv
Export the jenv path to .bash_profile or .zshrc - whatever you are using. I am using .zshrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -xeuo pipefail | |
create_bridge() { | |
local nsname="$1" | |
local ifname="$2" | |
echo "Creating bridge ${nsname}/${ifname}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: ConfigMap | |
metadata: | |
name: redis-config | |
data: | |
redis.conf: | | |
# Redis configuration file example. | |
# | |
# Note that in order to read the configuration file, Redis must be | |
# started with the file path as first argument: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.9" | |
services: | |
db: | |
image: mysql/mysql-server:5.7 | |
environment: | |
MYSQL_DATABASE: 'db' | |
MYSQL_ROOT_PASSWORD: 'secret-pw' | |
MYSQL_ROOT_HOST: '%' | |
ports: | |
- '3306:3306' |