Emergent transition from React
into Angular
due to terms and conditions.
Emergent transition from React
into Angular
due to terms and conditions.
How to backup LinkedIn saved posts manually
To export account data from LinkedIn website can be of a lot of muddle and hassle, but the result may not be yet decent for the missing saved posts.
Let’s do this in a manual automated way by scripting.
Code snippet for saving data as a downloadable JSON file (source):
1 | (function(console){ |
This line looks weird, just an ad-hoc cure when the error of undefined $
occurs with the arrow function operating on the jQuery selector. The cause of error still remains a mystery…
Apple M1 Development Quick-start
1 | ==> Downloading and installing Homebrew... |
To get rid of the initial git error, install a complete version of Command Line Tools from Apple Developer site.
Validate Command Line Tools:
sudo xcode-select -p
/bin/bash -c “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)”
brew install curl wget
If you need to have curl first in your PATH, run:
echo ‘export PATH=”/opt/homebrew/opt/curl/bin:$PATH”‘ >> ~/.zshrc
For compilers to find curl you may need to set:
export LDFLAGS=”-L/opt/homebrew/opt/curl/lib”
export CPPFLAGS=”-I/opt/homebrew/opt/curl/include”
Extend the default zsh
shell with rich sources of plugins and themes.
You should create NVM’s working directory if it doesn’t exist:
mkdir ~/.nvm
Add the following to ~/.zshrc or your desired shell
configuration file:
1 | export NVM_DIR="$HOME/.nvm" |
Soft Router Solution on Ubuntu Server 20.04
This solution is based on the built-in systemd-networkd
, isc-dhcp-server
and hostapd
; conflicted with dnsmasq
.
It is using the built-in IP forwarding feature against bridging. See also routing vs bridging
1 | sudo ufw enable |
1 | sudo service isc-dhcp-server start |
1 | sudo systemctl unmask hostapd |
MLNX_OFED_LINUX-5.1
no longer supports lowest-end Mellanox ConnectX3
series; using MLNX_OFED_LINUX-5.0
instead.
sudo mount [MLNX…_ubuntu20.04_x86_64.iso] /mnt/cdrom -o loop
./mlnxofedinstall
sudo mst start
sudo mst status
ibv_devinfo
mlxconfig -d [device_identifier] query
mlxconfig -d [device_identifier] set LINK_TYPE_P1=2
sudo systemctl start opensmd
See also more.
System Design Memorandum on Priority Topics
TL;DR
Cache prefers immutable or static data.
Cache can be stale when not updated. Ask, do we care that much?
Write Policy: Write through cache vs write back cache
Eviction policy: LRU, FIFO, LFU
It is more complicated when syncing Cache replicas & DB replicas and maintain consistency & high throughput.
Get() follows cache-aside strategy ; update() follows write through strategy;
delete() request both operations into caches and DBs; upon DB changed, trigger some asynchronized threads to wait a certain while and notify the cache again to evict stale data that happened to be brought by concurrent reading from DB into cache (proven and incorporated by Facebook)
Consistent hashing maximizes the cache hits when adding and removing cache nodes; minimizes key re-distribution; mitigate hotkey problem
Data Analytics from the Perspective of AWS
TL;DR
Analysis is a detailed examination of something in order to understand its nature or determine its essential features. Data analysis is the process of compiling, processing, and analyzing data so that you can use it to make decisions.
Analytics is the systematic analysis of data. Data analytics is the specific analytical process being applied.
Data analysis solutions, which are broader than big data solutions, are made up of gathering, storing, processing, and visualizing data.
The challenges identified in many data analysis solutions can be summarized by five key challenges: volume, velocity, variety, veracity, and value.
Structured data is organized and stored in the form of values that are grouped into rows and columns of a table. Commonly stored in relational databases.
Semi-structured data is often stored in a series of key-value pairs that are grouped into elements within a file. Often stored in NoSQL databases or CSV, XML or JSON files.
Unstructured data is not structured in a consistent way. Some data may have structure similar to semi-structured data but others may only contain metadata. Often takes the form of files or objects.
Kubernetes (K8s) Containerization at an Entry Level
TL;DR
A container is an executable unit of software in which application code is packaged (encapsulated), along with its libraries and dependencies, in common ways so that it can be run anywhere, whether
on a desktop, on-premises, or in the cloud.
A container include a guest OS; instead it leverages host OS.
Compared to virtual machines, containers virtualize the operating system rather than the infrastructure.
The clear benefit of containers is that you do not have to run a dedicated operating system instance for each virtual environment. Instead, one operating system is virtualized across all the containers.
To do this, containers take advantage of a form of operating system virtualization.
Benefits: isolates processes; controls resources allocated to them; small, fast portable
Learning Paths towards AWS Certification
TL;DR
scalable, durable object storage; decoupling storage from processing; parallelization; centralized, accessible and avoid moving between systems
S3 bucket policy and IAM policy are different.
Blocking the offending website IP traffic in security group may be trivial; makes “allows” but not “denies”
AWS CloudFormation treats infrastructure / environment as code.
RDS Backups are automated, daily full backup; transaction logs are backed-up every 5 min. 7-35 days of retention. Manual DB snapshots have retention as long as possible.
RDS can have up to 5 read replicas, within AZ, cross AZ or cross origin. Async replication. Reads are eventually consistent. Replicas can be promoted. It is possible to setup multi-AZ read replicas for Disaster Recovery(DR).
Miscellanies about initializing an Ubuntu Server (II)
Better solution than before:
1 | sudo groupadd docker |
[UPDATE]
Looks like it is also required to logging out and back so that the group membership change takes effect (how?):
1 | su -s ${USER} |
And this is to check for group membership:
1 | getent group groupname | awk -F: '{print $4}' |
Either systemd
or systemctl
won’t be able to locate or control Docker
, which would occur when Docker is pre-installed with Ubuntu Server. Use snap commands instead:
1 | sudo snap services docker |
This is likely to be a cure-all:
1 | sudo apt install -y build-essential |