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
| // Used in https://jina.ai/tokenizer (Aug. 14th version) | |
| // Define variables for magic numbers | |
| const MAX_HEADING_LENGTH = 6; | |
| const MAX_HEADING_CONTENT_LENGTH = 200; | |
| const MAX_HEADING_UNDERLINE_LENGTH = 200; | |
| const MAX_HTML_HEADING_ATTRIBUTES_LENGTH = 100; | |
| const MAX_LIST_ITEM_LENGTH = 200; | |
| const MAX_NESTED_LIST_ITEMS = 5; | |
| const MAX_LIST_INDENT_SPACES = 7; | |
| const MAX_BLOCKQUOTE_LINE_LENGTH = 200; |
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
| FROM debian:buster | |
| ENV DEBIAN_FRONTEND=noninteractive | |
| RUN set -e -x; \ | |
| apt-get update; \ | |
| apt-get install -y locales locales-all sudo apt-utils apt-transport-https ca-certificates curl; \ | |
| useradd -m -s /bin/bash builder; \ | |
| usermod -a -G sudo builder; \ | |
| echo 'builder ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers.d/builder; \ |
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
| package main | |
| import ( | |
| "encoding/json" | |
| "time" | |
| "math/rand" | |
| "regexp" | |
| "strconv" |
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
| # no confirmation | |
| find -name "tmp_pack*" -type f -exec rm {} \; | |
| # with confirmation from user | |
| find -name "tmp_pack*" -type f -exec rm -i {} \; |
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 | |
| cat > /etc/modules-load.d/netfilter.conf <<EOF | |
| br_netfilter | |
| EOF | |
| cat > /etc/sysctl.d/00-panic.conf <<EOF | |
| kernel.panic=10 | |
| EOF |
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
| * soft nofile 655350 | |
| * hard nofile 1310700 |
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
| ACTION=="add|change", KERNEL=="sd[a-z]|mmcblk[0-9]*", ATTR{queue/scheduler}="bfq" | |
| ACTION=="add|change", KERNEL=="nvme[0-9]n[0-9]", ATTR{queue/scheduler}="bfq" |
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
| [Unit] | |
| Description=zram swap generator on %I | |
| After=multi-user.target | |
| [Service] | |
| Type=oneshot | |
| RemainAfterExit=true | |
| TimeoutSec=60 | |
| Environment=ALGO=zstd |
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
| GRUB_CMDLINE_LINUX="amd_iommu=on iommu=pt rhgb quiet" |
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
| sudo firewall-cmd --permanent --direct --passthrough ipv4 -I FORWARD -m physdev --physdev-is-bridged -j ACCEPT | |
| sudo firewall-cmd --permanent --direct --passthrough ipv6 -I FORWARD -m physdev --physdev-is-bridged -j ACCEPT |
NewerOlder