- Any live usb bootable.
- Alpine Linux minirootfs archive, we can get it here. We can choose
alpine-minirootfs-3.20.2-x86_64.tar.gz. - Some partitions, for root system (/), efi (if you have uefi machine) and swap (optional).
- Basic commandline knowledge.
- Disable or uninstall the official
C/C++ plugin. - Install the
clangdplugin. - Build the kernel with
clang:
/path/to/kernel_source$ make CC=clang defconfig
/path/to/kernel_source$ make CC=clang -j16
- Generate the
compile_commands.json:
/path/to/kernel_source$ python ./scripts/clang-tools/gen_compile_commands.py
This file contains hidden or 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 bash | |
| readonly SCRIPT=$(basename "$0") | |
| readonly VERSION='1.0.0' | |
| readonly AUTHOR='xy.kong@gmail.com' | |
| readonly SOURCE='https://gist.github.com/xykong/6efdb1ed57535d18cb63aa8e20da3f4b' | |
| # For script running robust | |
| set -o nounset # to exit when your script tries to use undeclared variables | |
| set -o errexit # to make your script exit when a command fails |
This file contains hidden or 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
| ## installation openldap with backend mysql | |
| sudo apt update && sudo apt upgrade -y && sudo reboot | |
| sudo apt install mysql-server unixodbc make gcc libmysqlclient-dev unixodbc-dev groff ldap-utils | |
| ## mysql login as root | |
| sudo mysql -u root | |
| CREATE DATABASE ldap | |
| CREATE USER 'ldap'@'%' IDENTIFIED BY 'S3cureP4ssw0rd$'; | |
| GRANT ALL PRIVILEGES ON ldap.* TO 'ldap'@'%'; |
This file contains hidden or 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
| # -*- encoding: utf-8 -*- | |
| # requires a recent enough python with idna support in socket | |
| # pyopenssl, cryptography and idna | |
| from OpenSSL import SSL | |
| from cryptography import x509 | |
| from cryptography.x509.oid import NameOID | |
| import idna | |
| from socket import socket |
This file contains hidden or 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
| [Desktop Entry] | |
| Categories=Development; | |
| Comment=Supercharge your API workflow | |
| Exec="/home/hauthorn/Programs/Postman/Postman" | |
| Icon=/home/hauthorn/Programs/Postman/app/resources/app/assets/icon.png | |
| Name=Postman | |
| Terminal=false | |
| Type=Application | |
| Version=1.0 |
This file contains hidden or 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
| #!/bin/bash | |
| # Maintainer: Gowe Wang<i@gowe.wang> | |
| # Reference: https://tools.ietf.org/html/rfc5280#section-4.2.2.1 | |
| # Notice: Just available in most cases. | |
| curl -s $(openssl x509 -in $1 -noout -text | grep -Po "((?<=CA Issuers - URI:)http://.*)$") | openssl x509 -inform DER -outform PEM |
This file contains hidden or 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
| #!/bin/sh | |
| set -e | |
| git config -f .gitmodules --get-regexp '^submodule\..*\.path$' | | |
| while read path_key path | |
| do | |
| url_key=$(echo $path_key | sed 's/\.path/.url/') | |
| url=$(git config -f .gitmodules --get "$url_key") | |
| git submodule add $url $path |