#snippet — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #snippet, aggregated by home.social.
-
Need to bulk reset AD user passwords from a CSV? This PowerShell snippet processes each user, handles errors, logs success/failure, and forces password change at next logon. Works on Windows Server 2016-2022. #windows #snippet #powershell
https://www.valtersit.com/vault/bulk-reset-ad-user-passwords-via-csv-with-error-handling-62aae1/
-
Automate compliance fixes: use OpenSCAP's generate-fix to create a Bash remediation script from XCCDF scan results. Maps failed rules to benchmark fixes for RHEL 8/9, CentOS 8, Fedora 36+. #remediation #snippet #openscap
https://www.valtersit.com/vault/remediation-script-generation-from-scan-results-911c2d/
-
Need to cap CPU on a legacy system without cgroups? cpulimit attaches to a PID and sends SIGSTOP/SIGCONT at microsecond intervals to enforce a percentage limit. Works on CentOS 7, Ubuntu 20.04, Debian 11. #linux #snippet #cpu-throttling
https://www.valtersit.com/vault/limit-process-cpu-usage-with-cpulimit-on-legacy-systems-bcf5ce/
-
Need 90th, 95th & 99th percentiles over sliding 1-hour windows for CPU metrics? This Flux script uses window() and quantile() with t-digest for efficient approximate computation. #flux #snippet #percentile
https://www.valtersit.com/vault/flux-query-for-aggregated-windowed-percentiles-5f6a22/
-
Use InfluxDB as an annotation source in Grafana to overlay events like deployments on your graphs. This Flux query maps event data from a measurement into the required _time, title, and text columns, using a host tag matched to a dashboard variable. #grafana #snippet #annotations
https://www.valtersit.com/vault/grafana-annotations-from-influxdb-event-data-24149e/
-
Stop namespace conflicts in Helm. Use .Release.Namespace to dynamically scope resources to the release’s namespace. Works with Helm 3.x on Kubernetes 1.19+. No more cross-namespace clashes. #helm #snippet #kubernetes
https://www.valtersit.com/vault/helm-chart-with-dynamic-namespace-scoping-using-releasenames-a0a2ff/
-
Secure your container data: Mount host directories as read-only using Docker volumes. The `:ro` flag enforces kernel-level write protection, preventing container processes from altering the host filesystem. Essential for security. #docker #snippet #volumes #read-only #ValtersIT
https://www.valtersit.com/vault/mount-host-directory-into-container-with-readonly-volume-15db9f/
-
Keep Lynis audit logs under control with automated rotation and compression. This snippet configures logrotate to rotate logs weekly, gzip them, and retain 4 weeks of history — preventing disk exhaustion on Ubuntu 22.04, Debian 12, RHEL 9, or CentOS Stream 9. Essential for frequent scans. #lynis #snippet #logrotate
https://www.valtersit.com/vault/lynis-audit-with-custom-log-file-rotation-and-compression-417021/
-
I often get frustrated when copy-pasting commands from a website into my Nushell terminal, especially with those line-escaping backslashes...
Here is a little snippet I found to solve that issue.
Read more on my blog: https://moskitohero.com/post/2026-07-17-run-pasted-multiline-backslash-escaped-shell-commands-in-nushell/
-
I often get frustrated when copy-pasting commands from a website into my Nushell terminal, especially with those line-escaping backslashes...
Here is a little snippet I found to solve that issue.
Read more on my blog: https://moskitohero.com/post/2026-07-17-run-pasted-multiline-backslash-escaped-shell-commands-in-nushell/
-
Configure iDRAC for encrypted SNMP v3 traps: racadm sets trap destination, enables alerts, and configures auth/privacy protocols. iDRAC firmware generates traps from Dell MIBs on temperature, power, fan events.
#idrac #snippet #snmphttps://www.valtersit.com/vault/monitor-idrac-health-with-snmp-v3-traps-dbd4b1/
-
Enforce HTTPS for all S3 data access with this AWS CLI policy, meeting ISO 27001 A.13.2.3 on secure communications. Uses aws:SecureTransport condition to deny non-TLS requests. Scopable to specific principals.
#iso #snippet #awss3https://www.valtersit.com/vault/aws-s3-bucket-policy-enforcement-for-encryption-in-transit-f-cb113b/
-
Analyze per-process page faults with `ps` and `/proc/[pid]/stat`. Track major faults (disk I/O) vs minor faults (cache) via kernel's `task_struct`. Compute delta over time to spot high-impact processes. Production-ready for Ubuntu 22.04, Debian 12, RHEL 8. #linux #snippet #page-fault #major-fault #ValtersIT
https://www.valtersit.com/vault/perprocess-page-faults-and-major-fault-analysis-84c31f/
-
Monitor ZeroTier with Prometheus: Export peer counts, health & bandwidth stats via ZeroTier JSON API, scraped by node_exporter textfile collector. Script queries /status and /network/[ID] endpoints, outputs gauge metrics. Works on Ubuntu 22.04, Debian 12. #zerotier #prometheus #snippet
https://www.valtersit.com/vault/zerotier-with-prometheus-metrics-export-for-network-monitori-166910/
-
Calculate P99 latency from structured logs in Loki using LogQL. This query filters for `duration_ms` fields, then applies `quantile_over_time(0.99, [5m])` via the t-digest algorithm for efficient approximation. Works with Loki v2.6+ and LogQL v2.0+. Full guide at #loki #snippet #latency #p99 #ValtersIT
https://www.valtersit.com/vault/logql-query-for-p99-latency-from-structured-logs-ed74fb/
-
Monitor USB insertion events to detect data exfiltration. Use wevtutil to query System log for Event ID 20001 from Microsoft-Windows-Kernel-PnP, filtering for 'USB\VID_' hardware IDs. Outputs timestamps, device description, and serial number. #windows #snippet #usb-monitoring #dlp #ValtersIT
https://www.valtersit.com/vault/monitor-usb-device-insertion-events-for-data-exfiltration-274ac0/
-
Monitor USB insertion events to detect data exfiltration. Use wevtutil to query System log for Event ID 20001 from Microsoft-Windows-Kernel-PnP, filtering for 'USB\VID_' hardware IDs. Outputs timestamps, device description, and serial number. #windows #snippet #usb-monitoring #dlp #ValtersIT
https://www.valtersit.com/vault/monitor-usb-device-insertion-events-for-data-exfiltration-274ac0/
-
Monitor USB insertion events to detect data exfiltration. Use wevtutil to query System log for Event ID 20001 from Microsoft-Windows-Kernel-PnP, filtering for 'USB\VID_' hardware IDs. Outputs timestamps, device description, and serial number. #windows #snippet #usb-monitoring #dlp #ValtersIT
https://www.valtersit.com/vault/monitor-usb-device-insertion-events-for-data-exfiltration-274ac0/
-
Monitor USB insertion events to detect data exfiltration. Use wevtutil to query System log for Event ID 20001 from Microsoft-Windows-Kernel-PnP, filtering for 'USB\VID_' hardware IDs. Outputs timestamps, device description, and serial number. #windows #snippet #usb-monitoring #dlp #ValtersIT
https://www.valtersit.com/vault/monitor-usb-device-insertion-events-for-data-exfiltration-274ac0/
-
Monitor USB insertion events to detect data exfiltration. Use wevtutil to query System log for Event ID 20001 from Microsoft-Windows-Kernel-PnP, filtering for 'USB\VID_' hardware IDs. Outputs timestamps, device description, and serial number. #windows #snippet #usb-monitoring #dlp #ValtersIT
https://www.valtersit.com/vault/monitor-usb-device-insertion-events-for-data-exfiltration-274ac0/
-
Deploy stateful Workers with Durable Objects using `wrangler deploy --bind`. Achieve strongly consistent state across requests via a single global coordinator with SQLite-based persistence. Automatic failover included. #cloudflare #durable-objects #snippet
https://www.valtersit.com/vault/integrate-workers-with-durable-objects-for-stateful-logic-582900/
-
Zero-downtime deployments with Fabric: This snippet implements blue-green swapping by checking a symlink, deploying to the inactive environment, and running health checks via c.run(). Perfect for Ubuntu/Debian. #fabric #snippet #blue-green
https://www.valtersit.com/vault/rolling-deploy-with-bluegreen-strategy-using-fabric-c726d9/
-
Migrate Terraform state from local to S3 without re-importing resources. Use `terraform state mv` combined with a backend migration to rename and transition state files seamlessly. Works on Linux, macOS, Windows (Terraform 0.12+). Details: #terraform #snippet #state-migration #s3 #ValtersIT
https://www.valtersit.com/vault/migrate-terraform-state-from-local-to-s3-with-state-move-98b64b/
-
Can't trust a scan from within an infected OS. This snippet triggers Windows Defender Offline Scan via WinRE, booting into a minimal PE environment with updated signatures to catch persistent, hidden malware. Windows 10/11, Server 2016+. #windows #snippet #offline-scan #winre #ValtersIT
https://www.valtersit.com/vault/offline-scan-for-persistent-malware-via-winre-integration-274e03/
-
Protect your VLAN configs! Backup vlan.dat on Cisco IOS/IOS-XE switches with `copy flash:vlan.dat flash:vlan-backup.dat`. Restore via `copy flash:vlan-backup.dat flash:vlan.dat` and reload. Essential for disaster recovery or cloning setups. #cisco #snippet #ValtersIT
https://www.valtersit.com/vault/vlan-database-backup-and-restore-via-flash-722e21/
-
Need to route multiple subnets through a single IPSec tunnel on VyOS 1.4? This snippet shows how to configure multiple traffic selectors (TS) with strongSwan and XFRM for efficient site-to-site connections. #vyos #snippet #ipsec #traffic-selector #ValtersIT
https://www.valtersit.com/vault/ipsec-tunnel-with-traffic-selectors-and-multiple-subnets-on--456fe5/
-
Streamline your LLMNR poisoning workflow: Use Responder's -o and -F flags to output NTLMv1 hashes in Hashcat-compatible format for offline cracking with mode 5500. Works on Kali, Ubuntu, Parrot. #responder #snippet #hashcat #llmnr #ValtersIT
https://www.valtersit.com/vault/llmnr-poisoning-with-hashcatcompatible-output-63742d/
-
SCAP drift detection via timestamp-based differential scanning: compare current scan start-time to baseline ARF using oscap info. If delta > 24h, full scan; else quick OVAL delta check. Works on RHEL 8, Ubuntu 22.04, Debian 12. #openscap #snippet #drift
https://www.valtersit.com/vault/scap-timestampbased-differential-scanning-for-drift-detectio-8dbf83/
-
Detect stealth port knocking with NSE. Use knock.nse to analyze packet captures or simulate knocks, probing sequences like 7000,8000 to uncover hidden firewall openings. Works on Linux, macOS. #nmap #snippet #port-knocking #nse #ValtersIT
https://www.valtersit.com/vault/port-knocking-detection-via-nse-ecab3f/
-
Bridge Tailscale and WireGuard VPNs on a Linux host with dual-stack routing. Use `tailscale up --accept-routes --advertise-routes=10.0.1.0/24` and `wg-quick up`, plus iptables forwarding. Full guide on Ubuntu/Debian. #bridge #snippet #wireguard #interoperability #ValtersIT
https://www.valtersit.com/vault/tailscale-multinode-bridge-with-wireguard-interoperability-93d214/
-
Deploy the Tailscale Kubernetes operator with Helm, then expose services directly via Tailscale ingress — no load balancer needed. Create a ProxyClass for tags, annotate your service, and get per-pod node connectivity. Kubernetes 1.24+, Helm 3.8+. #kubernetes #snippet #operator
https://www.valtersit.com/vault/tailscale-kubernetes-operator-with-ingress-controller-integr-0aaa01/
-
Auditd can now monitor LXC container events like mounts, syscalls, and privilege escalation. Filter rules by PID namespaces or UID ranges on Ubuntu 22.04, Debian 12, or RHEL 9. Track suspicious activity via the kernel audit subsystem. #auditd #snippet #forensics #ValtersIT
https://www.valtersit.com/vault/auditd-monitoring-for-lxc-container-events-cfd7c5/
-
Need to remove a sensitive resource from Terraform state without destroying it? `terraform state rm` deletes the entry from your state file while keeping the actual infrastructure untouched. Useful for cleaning up state in production. #terraform #snippet #state-rm #sensitive-data #ValtersIT
https://www.valtersit.com/vault/purge-sensitive-data-from-terraform-state-with-state-rm-3b698c/
-
Master multi-WAN load balancing with nftables mark-based policy routing. Mark traffic from 10.0.1.0/24 as 1 and 10.0.2.0/24 as 2, then use ip rule to route via separate tables. Works on Ubuntu 22.04, Debian 12, RHEL 9, Fedora 38+. #linux #snippet #nftables
https://www.valtersit.com/vault/nftables-markbased-policy-routing-for-multiwan-load-balancin-d06f71/
-
Need CORS for your S3 bucket that allows all origins except one malicious domain? Standard S3 CORS doesn't support wildcard exclusions, but you can combine AllowedOrigins with a bucket policy Condition element to deny specific origins. Here's the workaround. #cors #snippet #aws-s3 #bucket-policy #ValtersIT
https://www.valtersit.com/vault/cors-with-wildcard-exclusions-for-cdn-origins-in-aws-s3-455edc/
-
Samhain HIDS with centralized Yubikey-signed database for file integrity monitoring. Scan files, compare checksums, encrypted TCP reports to server. Agent runs as daemon or cron. Ubuntu 22.04, Debian 12, RHEL 9. #linux #snippet #samhain #centralized #ValtersIT
https://www.valtersit.com/vault/samhain-centralized-file-integrity-monitoring-with-database--af812c/
-
Spot anomalous DNS queries from systemd-resolved logs with this journalctl + grep pipeline for frequency analysis. Filters 'type=A' and 'result=success' to detect C2 or exfiltration patterns. #linux #snippet #dns #ValtersIT
https://www.valtersit.com/vault/detecting-anomalous-dns-queries-from-systemdresolved-logs-0c53b6/
-
New YARA rule targets malicious Office macros in OLE2 docs (.doc, .xls). Uses OLE2 module to scan 'Macros' stream for VBA signatures like AutoOpen/AutoExec. Works on YARA 4.0+ across Linux, Windows, macOS. #yara #snippet #ValtersIT
https://www.valtersit.com/vault/yara-rule-for-office-macro-ole2-stream-analysis-12e20d/
-
Stop brute-force SSH attacks with a custom fail2ban action that temporarily bans IPs via UFW. This script integrates ufw deny rules, auto-removes them after a set time, and works on Ubuntu 22.04 and Debian 12. #ufw #snippet #fail2ban
https://www.valtersit.com/vault/ufw-temporary-ban-for-repeated-failed-ssh-attempts-d722e6/
-
Blacklist revoked JWTs with Redis using the token's jti claim as key and expiry matching remaining lifetime. Check blacklist on every API request before signature verification. Stateless token handling, consistent revocation. #jwt #snippet #revocation #ValtersIT
https://www.valtersit.com/vault/blacklist-compromised-jwts-with-redis-and-consistency-checks-9a065b/
-
Need a ClusterRole that grants wide access but excludes secrets, configmaps, and authorization.k8s.io? This YAML uses a deny-all approach: allow all verbs on all resources, then explicitly exclude sensitive resources. Kubernetes RBAC merges rules additively. Works on K8s 1.22+. #rbac #kubernetes #snippet
https://www.valtersit.com/vault/clusterrole-for-wildcard-api-group-excluding-sensitive-resou-58e385/
-
Need to generate and sign a SAML AuthnRequest for HTTP-Redirect binding? This snippet uses OpenSSL and xmlstarlet to create the signed XML with AssertionConsumerServiceURL and ForceAuthn.
#saml #snippet #ValtersIThttps://www.valtersit.com/vault/saml-authnrequest-generation-and-signing-with-openssl-99af97/
-
Isolate tenants with Private VLANs on Cisco IOS/NX-OS. This config creates a PVLAN domain (primary VLAN 200, isolated VLANs 201/202), using promiscuous uplink and isolated/community host ports to restrict inter-tenant traffic. #vlans #snippet #private-vlan #tenant-isolation #ValtersIT
https://www.valtersit.com/vault/vlan-access-control-with-private-vlans-for-tenant-isolation-24abd8/
-
Configure external HTTPS access with Istio: ServiceEntry + DestinationRule for TLS origination from sidecar. Uses resolution NONE (Envoy DNS), supports mTLS with client certs. Kubernetes 1.22+, Istio 1.16+. #istio #snippet #serviceentry #tls #ValtersIT
https://www.valtersit.com/vault/external-service-access-via-serviceentry-with-tls-originatio-9cfdac/
-
Need consistent MongoDB replica set backups? Use mongodump with --oplog for point-in-time consistency. Connects to primary, captures writes during dump, writes BSON files, and compresses with gzip. Works on Ubuntu 22.04, CentOS 7, RHEL 9. #database #snippet #mongodb #mongodump #ValtersIT
https://www.valtersit.com/vault/mongodb-replica-set-backup-with-mongodump-and-oplog-270774/
-
ZFS deduplication (dedup) saves space but eats RAM. Run DDT checks with zdb -D, identify duplicate blocks via awk, then delete/recreate dataset with dedup=off to clean up. Proxmox/FreeBSD compatible. #zfs #snippet #deduplication #storage #ValtersIT
https://www.valtersit.com/vault/zfs-deduplication-verification-and-cleanup-script-449f7b/
-
Exploit Heartbleed (CVE-2014-0160) with OpenSSL s_client: send a malformed heartbeat request with oversized payload length to extract up to 64KB of heap memory. Use -no_ssl3 -no_tls1 for TLS 1.0/1.1, -msg to capture leaked data. #cve #snippet #heartbleed #cve-2014-0160 #ValtersIT
https://www.valtersit.com/vault/heartbleed-memory-extraction-via-openssl-sclient-80ed4a/
-
Running BGP between ZeroTier and your physical router? This snippet configures VyOS to redistribute ZeroTier subnets via iBGP using FRR, making zt0 routes available to your local network. Full config at #zerotier #snippet #bgp #vyos #ValtersIT
https://www.valtersit.com/vault/zerotier-route-redistribution-via-bgp-on-vyos-2c3ef2/
-
une solution qui me convient en attendant de dépasser le seuil de flemme :
```
nb ls --limit 10 --excerpt 5 --pager --paths --sort --reverse
``` -
Alien verse 1 not full
Call me
This year
This summer
A new world
A new order
A new leader
New original ep by fend otw check out the lead singles "cody" & "alien" soon droping more singles
Stay tuned
Yt channel: https://youtube.com/@fffend?si=7QgpCwV9lGSm2c8h
Keep up if you want
Unknown L*sers
#music #art #snippet #checkout #design #song #newmusic #undergroundmusic #newartist