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 |+++++++++++++++++++++
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
GOCMD=go | |
GOTEST=$(GOCMD) test | |
GOVET=$(GOCMD) vet | |
BINARY_NAME=example | |
VERSION?=0.0.0 | |
SERVICE_PORT?=3000 | |
DOCKER_REGISTRY?= #if set it should finished by / | |
EXPORT_RESULT?=false # for CI please set EXPORT_RESULT to true | |
GREEN := $(shell tput -Txterm setaf 2) |
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
package main | |
import ( | |
"fmt" | |
"os" | |
"runtime" | |
"sync" | |
"time" | |
) |
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
use hyper::upgrade; | |
use tokio_tungstenite::WebSocketStream; | |
use futures::stream::StreamExt; | |
... | |
tokio::spawn(async move { | |
//using the hyper feature of upgrading a connection | |
match upgrade::on(&mut request).await { | |
//if successfully upgraded |
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
use hyper::{Client, Server, Request, Response, Body}; | |
use anyhow::*; | |
use std::net::SocketAddr; | |
use hyper::service::{make_service_fn, service_fn}; | |
use std::sync::{Arc, RwLock}; | |
fn mutate_request(req: &mut Request<Body>) -> Result<()> { | |
for key in &["content-length", "transfer-encoding", "accept-encoding", "content-encoding"] { | |
req.headers_mut().remove(*key); | |
} |
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
// Create an instance of the "Modern" toy graph | |
graph = TinkerFactory.createModern() | |
// Create the traversal source | |
g = graph.traversal() | |
// Get all vertices |
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
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, |
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
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 |
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' | |
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/bin
directory. -
Run
mysqld --initialize
.This will initialize the mysql data directory at location specified in
/MySQL-8.0/my.ini
file; if not, it will initialize the data directory inside/MySQL-8.0/data
. -
Run
mysqld --console
command.
NewerOlder