2024-07-01
Block Unauthorized Access By Firewall

ufw

1
2
sudo ufw deny from <ip_range> port <port>

firewalld

1
2
sudo firewall-cmd --add-rich-rule='rule family="ipv4" source address="<ip_range>" port protocol="tcp" port="<port>" drop'

Read More

2024-03-01
Serve Models From Replicate Locally

Replicate internally use Cog for packaging and serving large AI models in Docker containers. Currently it only supports macOS and Linux.

According to the doc it offers nearly the same functionally as Replicate such as API calls, fine-tuning.


You may connect your local LLM to VSCode using Continue, an open-source Copilot alternative.

Read More

2023-08-13
resource utilization monitor tool

linux

htop for ram and processes. s-tui for cpu/gpu temperatures

Read More

2023-08-08
Exploring Alternative Linux Cd Managers: Goto, Go-Shell, Up, And Autojump

cd manager Linux alternative

goto supports bash and zsh (compdef needed)

go-shell supports powershell

up navigates to parent directory, supports fish, bash, zsh

autojump

Read More

2023-08-07
Aldente Windows & Linux Alternative

to increase stability, you need to prevent computer from overheating (throttle). also, replace normal laptop ram with ecc ram (not server-grade reg-ecc)

but ecc is only supported on Xeon processors.

moreover, you could just use UPS+NUC instead of laptop, to prevent this bloody battery issue.


will these charging limits still work if we close the lid? if not, we could possibly damage the battery.


to prevent damage to computer battery due to overcharging

Linux

kernel 5.5 or newer:

1
2
echo 60 | sudo tee /sys/class/power_supply/BAT0/charge_control_end_threshold

with platform-specific drivers, look for: /sys/devices/platform/.*/.*(battery|charge|thresh|limit).*

For ThinkPads and selected other laptops tlp/tlpui (acts like powertop which turns off usb devices, so be careful when running long-term programs) provides a unified way

to configure charge thresholds and recalibrate the battery.

Sometimes tp-smapi from apt will not install and you need to fetch the source and compile yourself. Activate the plugin by sudo modprobe tp_smapi

Run sudo systemctl start tlp to initiate service. Run sudo tlp-stat -s to check status.

Windows

Read More

2023-01-05
Install Neo4J As Systemd Service

save this under /lib/systemd/system/neo4j.service

1
2
3
4
5
6
7
8
9
10
11
[Unit]
Description=Neo4j Graph Database
Documentation=http://docs.neo4j.org
[Service]
Type=simple
ExecStart=/usr/bin/neo4j console
ExecStop=/usr/bin/neo4j stop
Restart=on-failure
[Install]
WantedBy=multi-user.target

Read More