Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
function enable_core() {
bash -c "echo 1 > \"/sys/devices/system/cpu/cpu$1/online\""
echo "Set Core $1 : enabled"
}
function disable_core() {
bash -c "echo 0 > \"/sys/devices/system/cpu/cpu$1/online\""
echo "Set Core $1 : disabled"
@edgeloom
edgeloom / .sh
Created October 15, 2022 00:13 — forked from alexanderstephan/.sh
Create a swap file on Manjaro or Arch
# Create the file itself
sudo dd if=/dev/zero of=/swapfile bs=1M count=4096 status=progress
# Only root should be able to read and write
sudo chmod 600 /swapfile
# Format the swap file
sudo mkswap /swapfile
# Enable the swap