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 | |
| # Configuration | |
| VMID=111 | |
| SYMLINK_NAME="usb-printer-samsung" | |
| VENDOR_ID="04e8" | |
| PRODUCT_ID="342e" | |
| SERIAL_NUM="1457BFBZ106391F." | |
| echo "--- Starting Permanent USB Passthrough Setup (udev) ---" |
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 | |
| # Configuration | |
| VMID=111 | |
| HOOK_PATH="/var/lib/vz/snippets/printer-autobind.sh" | |
| PRINTER_ID="04e8:342e" # Samsung Vendor:Product ID | |
| echo "--- Starting Printer Hook Setup for LXC $VMID ---" | |
| # 1. Create the snippets directory |
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 | |
| # Proxmox LXC CUPS Print Server Setup Script (Hotplug Resilient) | |
| # Run this script on your Proxmox host as root. | |
| # Gist Description: Automates the creation of an unprivileged Debian LXC container on Proxmox, passing through a USB printer, configuring CUPS + Avahi, and enabling robust hotplug support. | |
| set -e | |
| # ================= Configuration ================= | |
| CTID=111 | |
| TEMPLATE="local:vztmpl/debian-13-standard_13.1-2_amd64.tar.zst" |
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 | |
| # | |
| # Proxmox MCP client provisioning (run on a PVE node). | |
| # | |
| # Prompts for an MCP client name (e.g. gemini, cursor, claude), then creates or | |
| # updates a dedicated Proxmox user and API token for that client. All MCP clients | |
| # share the same role (MCPAgent) and group (mcp-clients): permissions are | |
| # assigned to the group once; this script adds the new user to that group and | |
| # creates a token. If no name is entered, the script exits. | |
| # |
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 | |
| # Colors for better readability | |
| GREEN='\033[0;32m' | |
| BLUE='\033[0;34m' | |
| YELLOW='\033[1;33m' | |
| NC='\033[0m' # No Color | |
| echo -e "${BLUE}--- Proxmox Gemini Provisioning Started ---${NC}" |
This file has been truncated, but you can view the full file.
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
| var t,a;"function"==typeof(t=globalThis.define)&&(a=t,t=null),function(a,r,e,l,o){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},n="function"==typeof i[l]&&i[l],c=n.cache||{},h="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function u(t,r){if(!c[t]){if(!a[t]){var e="function"==typeof i[l]&&i[l];if(!r&&e)return e(t,!0);if(n)return n(t,!0);if(h&&"string"==typeof t)return h(t);var o=Error("Cannot find module '"+t+"'");throw o.code="MODULE_NOT_FOUND",o}g.resolve=function(r){var e=a[t][1][r];return null!=e?e:r},g.cache={};var d=c[t]=new u.Module(t);a[t][0].call(d.exports,g,d,d.exports,this)}return c[t].exports;function g(t){var a=g.resolve(t);return!1===a?{}:u(a)}}u.isParcelRequire=!0,u.Module=function(t){this.id=t,this.bundle=u,this.exports={}},u.modules=a,u.cache=c,u.parent=n,u.register=function(t,r){a[t]=[function(t,a){a.exports=r},{}]},Object.defineProperty(u,"root", |
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
| # Source: https://github.com/orgs/community/discussions/26291#discussioncomment-3251245 | |
| launch_as() { | |
| local cmd_name=$1 | |
| shift | |
| (time $@ || echo $cmd_name >> fail.txt) 2>&1 > $cmd_name.txt | |
| } | |
| time npm ci | |
| launch_as lint npm run lint & | |
| time npm run build | |
| launch_as build1 npm run build:build1 & |
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
| # https://medium.com/@kcmueller/delete-local-git-branches-that-were-deleted-on-remote-repository-b596b71b530c | |
| git branch -vv | grep ': gone]'| grep -v "\*" | awk '{ print $1; }' | xargs -r git branch -D |
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
| find . -name 'node_modules' -type d -prune -exec rm -rf '{}' + |
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
| if test -f /etc/profile.d/git-sdk.sh | |
| then | |
| TITLEPREFIX=SDK-${MSYSTEM#MINGW} | |
| else | |
| TITLEPREFIX=$MSYSTEM | |
| fi | |
| PS1='\[\033]0;$TITLEPREFIX:$PWD\007\]' # set window title | |
| PS1="$PS1"'\n' # new line | |
| # PS1="$PS1"'\[\033[32m\]' # change to green |
NewerOlder