- What do Etcd, Consul, and Zookeeper do?
- Service Registration:
- Host, port number, and sometimes authentication credentials, protocols, versions numbers, and/or environment details.
- Service Discovery:
- Ability for client application to query the central registry to learn of service location.
- Consistent and durable general-purpose K/V store across distributed system.
- Some solutions support this better than others.
- Based on Paxos or some derivative (i.e. Raft) algorithm to quickly converge to a consistent state.
- Service Registration:
- Centralized locking can be based on this K/V store.
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
FROM gcc:4 | |
ENV PATH /usr/local/bin:$PATH | |
ENV LANG C.UTF-8 | |
RUN apt-get update && apt-get install -y --no-install-recommends \ | |
ca-certificates \ | |
netbase \ | |
&& rm -rf /var/lib/apt/lists/* | |
ENV GPG_KEY 97FC712E4C024BBEA48A61ED3A5CA953F73C700D |
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
(def ^:private easing-fns | |
{:linear identity | |
:sine-in #(- 1 (js/Math.cos (/ (* % (.-PI js/Math)) 2))) | |
:sine-out #(js/Math.sin (/ (* % (.-PI js/Math)) 2)) | |
:sine-in-out #(/ (- (dec (js/Math.cos (* (.-PI js/Math) %)))) 2) | |
:quad-in #(* % %) | |
:quad-out #(* % (- 2 %)) | |
:quad-in-out #(if (< % 0.5) (* 2 % %) | |
(dec (* (- 4 (* 2 %)) %))) | |
:cubic-out #(inc (apply * (map dec [% % %]))) |
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
__all__ = ["better_dumps", "better_dump", "json_debug"] | |
import dataclasses | |
import datetime | |
import decimal | |
import json | |
from inspect import ismethod | |
import jsonpickle | |
from loguru import logger |
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 bb | |
;; https://book.babashka.org | |
;; https://book.babashka.org/#built-in-namespaces | |
(ns parse-country-codes | |
(:require | |
[cheshire.core :as json] | |
[clojure.data.csv :as csv] | |
[clojure.java.io :as io] | |
[clojure.string :as str])) |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Box Shadow</title> | |
<style> | |
.box { | |
height: 150px; | |
width: 300px; | |
margin: 20px; |
My machine Spec:
- Alienware X15 R1
- QHD w/ GSync
- RTX3070 MaxQ
It is definitely not an easy process, as everyone is posting this issue yet there is virtually no one posting their config when their setup is working. So I hope this helps someone with a setup like mine: Intel + Nvidia + Advanced Optimus.
I will list the steps I do here:
- Disable Advanced Optimus through BIOS (mine is V1.4.0), use only dGPU mode (until Nvidia fixes hybrid)
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
-- Author: Michael-Keith Bernard | |
-- Date: August 10, 2012 | |
-- | |
-- Notes: This Trie implementation is a port of the Clojure implementation | |
-- below. I had to implement quite a few functions from clojure.core to keep the | |
-- same basic functionality. Probably very little if any of this code is | |
-- production worthy, but it's interesting all the same. Finally, all of the | |
-- documentation strings are pulled directly from clojure.core and may not | |
-- accurately reflect the Lua implementation. | |
-- |
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
(-> 16 | |
nonce/random-bytes | |
codecs/bytes->b64u | |
codecs/bytes->str) |
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
let rtcConnection = null; | |
let rtcLoopbackConnection = null; | |
let loopbackStream = new MediaStream(); // this is the stream you will read from for actual audio output | |
const offerOptions = { | |
offerVideo: true, | |
offerAudio: true, | |
offerToReceiveAudio: false, | |
offerToReceiveVideo: false, | |
}; |