root@ubu1804vm:~# ctr image pull docker.io/library/redis:latest
docker.io/library/redis:latest: resolved |+++++++++++++++++++++++++++++++docker.io/library/redis:latest: resolved |++++++++++++++++++++++++++++++++++++++|
index-sha256:ddf831632db1a51716aa9c2e9b6a52f5035fc6fa98a8a6708f6e83033a49508d: done |++++++++++++++++++++++++++++++++++++++|
manifest-sha256:780f7dacdc133e899fba9ff09c099828b469030acefe6f3bbc16197b55800cfd: done |++++++++++++++++++++++++++++++++++++++|
layer-sha256:75797de34ea7abaf8ebd484896a21f5bda63ffbcade7217dad0be0b8b8333bde: done |++++++++++++++++++++++++++++++++++++++|
config-sha256:f0453552d7f26fc38ffc05fa034aa7a7bc6fbb01bc7bc5a9e4b3c0ab87068627: done |++++++++++++++++++++++++++++++++++++++|
layer-sha256:68ced04f60ab5c7a5f1d0b0b4e7572c5a4c8cce44866513d30d9df1a15277d6b: done |+++++++++++++++++++++
| const { request } = require('https') | |
| module.exports = (body) => | |
| new Promise((resolve, reject) => { | |
| try { | |
| body = JSON.stringify(body) | |
| const options = { | |
| hostname: 'contract-logic-endpoint.io', // runkit and glitch are my goto services | |
| port: 443, |
| echo 'deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/Debian_10/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list | |
| wget -nv https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/Debian_10/Release.key -O- | apt-key add - | |
| apt update | |
| apt install podman |
| version: '3' | |
| services: | |
| traefik: | |
| container_name: traefik | |
| image: traefik:v2.0 | |
| command: | |
| - "--api.insecure=true" | |
| - "--providers.docker=true" |
-
Install MySQL-8.0 from [here].
-
Open Terminal and go to
/MySQL-8.0/bindirectory. -
Run
mysqld --initialize.This will initialize the mysql data directory at location specified in
/MySQL-8.0/my.inifile; if not, it will initialize the data directory inside/MySQL-8.0/data. -
Run
mysqld --consolecommand.
Function-first means that we separate each file into the folder they belong to by their usage. For example in a modern frontend project we might have the following folders:
/components: Dumb components who only have presentational purposes/containers: Smart components who fetch data and have the logic to parse or modify it before sending it into the dumb components:/store: Contains all the store files like actions, reducers, selectors, etc.
This might be troublesome when having a large application. For example you might see yourself adding a lot of containers for each page and then having problems finding the file you want inside the containers folder. A common approach to solve this is put every container file inside a folder with the feature name, but then we are using feature-first.
| const MY_DOMAIN = "agodrich.com" | |
| const START_PAGE = "https://www.notion.so/gatsby-starter-notion-2c5e3d685aa341088d4cd8daca52fcc2" | |
| const DISQUS_SHORTNAME = "agodrich" | |
| addEventListener('fetch', event => { | |
| event.respondWith(fetchAndApply(event.request)) | |
| }) | |
| const corsHeaders = { | |
| "Access-Control-Allow-Origin": "*", |
| $ modprobe bridge | |
| $ echo "net.bridge.bridge-nf-call-iptables = 1" >> /etc/sysctl.conf | |
| $ sysctl -p /etc/sysctl.conf | |
| sysctl: cannot stat /proc/sys/net/bridge/bridge-nf-call-iptables: No such file or directory sysctl: cannot stat /proc/sys/net/bridge/bridge-nf-call-ip6tables: No such file or directory | |
| # SOLUTION | |
| $ modprobe br_netfilter | |
| $ sysctl -p /etc/sysctl.conf |
| #[test] | |
| fn iter_demo() { | |
| let v1 = vec![1, 2, 3]; | |
| let mut v1_iter = v1.iter(); | |
| // iter() returns an iterator of slices. | |
| assert_eq!(v1_iter.next(), Some(&1)); | |
| assert_eq!(v1_iter.next(), Some(&2)); | |
| assert_eq!(v1_iter.next(), Some(&3)); | |
| assert_eq!(v1_iter.next(), None); |
| # for version bump, thanks to alan | |
| VERSION := $(shell git describe --tags --abbrev=0 | sed -Ee 's/^v|-.*//') | |
| .PHONY: version | |
| version: | |
| @echo v$(VERSION) | |
| SEMVER_TYPES := major minor patch | |
| BUMP_TARGETS := $(addprefix bump-,$(SEMVER_TYPES)) | |
| .PHONY: $(BUMP_TARGETS) |