Skip to content

Instantly share code, notes, and snippets.

View rsenna's full-sized avatar
🏠
Working from home

Roger Senna rsenna

🏠
Working from home
  • Barcelona, Spain
  • 06:09 (UTC +02:00)
  • X @rsenna
View GitHub Profile
@rsenna
rsenna / gist:c6fdbb0f19af7c25fd856c620b8ee910
Created June 23, 2026 12:08 — forked from christopher-hopper/gist:6118414
Kill the processes and back-up accounts before removing

Remove Linux user accounts

I killed the processes and backed-up old accounts on the Peregrine UAT server 10.3.28.44. You can find tarballs for the home folders of all removed accounts on Peregrine UAT at:

10.3.28.44:/root/bak/deleted/users

To remove accounts safely I did the following:

  1. Lock the account.
@rsenna
rsenna / persist-file-perms.md
Created June 23, 2026 12:07 — forked from christopher-hopper/persist-file-perms.md
How to persist file system permissions for web applications.

Persist Filesystem Permissions

The writable files and folders for web applications often require specific user, group and permission masks to persist, even when new files and sub-folders are added by users or the application itself.

For example, permissions might need to be:

File mode

u:rw,g:rw
@rsenna
rsenna / domains-test.sh
Created June 23, 2026 12:07 — forked from christopher-hopper/domains-test.sh
Read domains from a file and follow each using an HTTP GET request
#!/usr/bin/env bash
# -----
# Read domains from a file and test HTTP GET request.
#
set -o errtrace
set -o pipefail
set -o errexit
set -o nounset
@rsenna
rsenna / README.md
Created June 23, 2026 12:06 — forked from christopher-hopper/README.md
macOS Zscaler stop | disable Zscaler on mac

Disable macOS Zscaler

The following script can be used to disable Zscaler on macOS. Zscaler is corporate spyware and security software that controls access to Internet resources and spoofs TLS certificates to allow inspection of encrypted communications on centrally managed corporate computers.

This script will not uninstall the Zscaler software.

#!/bin/bash
# vim: ai ts=2 sw=2 et sts=2 ft=sh
#
# macOS Desktop Finder Files Toggle
#
# Toggle the use of Finder to display the contents of the Desktop folder as
# icons on the macOS desktop. Hides or Shows all Finder files icons on the
# Desktop.
#
# https://ss64.com/osx/defaults.html
@rsenna
rsenna / fastfetch-custom-counters.md
Last active October 26, 2025 15:12
A nushell script providing a list of "custom" package managers, and the amount of packages installed globally for each one of them

Fastfetch is pretty cool, but it only shows the total ammount of packages for "system" package managers...

So I decided to write this nushell script. Never done much with nushell before. It's... interesting, and fast, but there are plenty of "wtfs" I guess I was not expecting. I'm happy with the result though.

Anyway, this script provides counters for other package/version managers I'm currently using.

So far it only supports

const {
Clipboard,
Front,
Hints,
Normal,
RUNTIME,
Visual,
aceVimMap,
addSearchAlias,
cmap,
@rsenna
rsenna / Console command
Created November 30, 2012 16:41 — forked from joshuaflanagan/Console command
Turn off Always Start When Debugging for all web projects (run within Nuget powershell console)
get-project -all | %{ $_.Properties | ?{ $_.Name -eq "WebApplication.StartWebServerOnDebug" } | %{ $_.Value = "False"} }