{"slug": "slop-function", "title": "slop function", "summary": "A developer shared a systemd-based tool called 'slop' that caps memory usage for resource-hungry applications like VS Code and Claude. The tool uses a systemd slice with memory limits and a shell function to launch apps within that slice, preventing them from consuming excessive RAM.", "body_md": "Place this into `~/.config/systemd/user/slop.slice`\n\n. Adjust the values for your machine.\n\n```\n[Slice]\nMemoryHigh=50G\nMemoryMax=56G\nMemorySwapMax=0\nTasksMax=4000\n```\n\nAnd this on .bashrc\n\n```\nslop () {\n  systemd-run --user --scope --slice=slop.slice --quiet -- \"$@\"\n}\n```\n\nThen you can run `slop code`\n\n(vscode) or `slop claude`\n\nand they'll not run rampant on your RAM.\n\nPlace this into `~/.config/systemd/user/slop.slice`\n\n. Adjust the values for your machine.\n\n␃WPNCODE0␃\n\nAnd this on .bashrc\n\n␃WPNCODE1␃\n\nThen you can run `slop code`\n\n(vscode) or `slop claude`\n\nand they'll not run rampant on your RAM.", "url": "https://wpnews.pro/news/slop-function", "canonical_source": "https://gist.github.com/alganet/4dcf3a2ae01388c374fc6ff501bd3f83", "published_at": "2026-08-28 21:23:45+00:00", "updated_at": "2026-08-30 17:52:31.103153+00:00", "lang": "en", "topics": ["developer-tools"], "entities": ["systemd", "VS Code", "Claude"], "alternates": {"html": "https://wpnews.pro/news/slop-function", "markdown": "https://wpnews.pro/news/slop-function.md", "text": "https://wpnews.pro/news/slop-function.txt", "jsonld": "https://wpnews.pro/news/slop-function.jsonld"}}