Skip to content

Instantly share code, notes, and snippets.

View lixit's full-sized avatar

xitong lixit

View GitHub Profile

platformio.ini

monitor_speed = 115200
lib_archive = false

main.cpp

#include <SimpleFOC.h>
@lixit
lixit / vnc_archlinux.md
Created January 24, 2022 06:50
config VNC on archlinux xfce4
sudo pacman -Syu xfce4 xfce4-goodies

reboot disable firewall

ufw disable

install tigervnc

build Qt statically with OpenSSL

  1. download Qt 5.15.1 Source Code from Qt Maintenance Tool.
  2. install Python, Perl, OpenSSL, jom
  3. make sure they are in Path environment variable.
  4. open x64 Native Tools Command Prompt for VS 2019

download OpenSSL from here https://slproweb.com/products/Win32OpenSSL.html

@lixit
lixit / Dockerfile
Created September 22, 2020 08:27 — forked from PurpleBooth/Dockerfile
Create a static binary in go and put it in a from scratch docker container
FROM golang:1.9
WORKDIR /go/src/github.com/purplebooth/example
COPY . .
RUN go build -ldflags "-linkmode external -extldflags -static" -a main.go
FROM scratch
COPY --from=0 /go/src/github.com/purplebooth/example/main /main
CMD ["/main"]
@lixit
lixit / install-ubuntu-server-via-console.md
Created May 20, 2020 10:52 — forked from maixuanhan/install-ubuntu-server-via-console.md
Install Ubuntu server 18.04 via USB disk and serial console

ASGI (Asynchronous Server Gateway Interface) Specification

ASGI consists of two different components:

  1. A protocol server, which terminates sockets and translates them into connections and per-connection event messages.
  2. An application, which lives inside a protocol server, is instantiated once per connection, and handles event messages as they happen.
socket ---&gt; protocol server -------&gt; application

WHAT IS VECTOR PACKET PROCESSING (VPP)?
FD.io VPP is the Swiss Army knife of networking toolchains - enabling astounding software packet processing.

Switching

Start VPP

cat startup1.conf
unix {cli-listen /run/vpp/cli-vpp1.sock}
api-segment { prefix vpp1 }
@lixit
lixit / git.md
Created November 21, 2019 07:42
git config --global user.name "Your Name Comes Here"
git config --global user.email you@yourdomain.example.com

git log --graph

man git-log
git help log

git init
@lixit
lixit / mariadb.md
Last active December 10, 2019 06:54

mysqld - the MariaDB server
mysql - the MariaDB command-line tool

database -> table -> attribute

Install in CentOS

$ cat /etc/yum.repos.d/MariaDB.repo
# MariaDB 10.4 CentOS repository list - created 2019-12-09 10:58 UTC

install static binaries

  • Docker daemon binary dockerd
  • Docker client docker
  1. Download the static binary archive: https://download.docker.com/linux/static/stable/
  2. Extract the archive tar xzvf /path/to/<FILE>.tar.gz
  3. Optional: move the binaries to a directory on your executable path sudo cp docker/* /usr/bin
  4. start the docker daemon sudo dockerd &amp;