Skip to content

Instantly share code, notes, and snippets.

View TheNetJedi's full-sized avatar
:shipit:
oof

Ameer Shaikh TheNetJedi

:shipit:
oof
View GitHub Profile
@TheNetJedi
TheNetJedi / gitlab_users_to_csv.py
Created April 7, 2025 10:13
This script fetches users from `https://gitlab.com` or self-hosted GitLab using the provided PAT and saves the relevant user details (ID, username, name, email, state, creation/activity dates, creator, URL, admin status, 2FA status) to `gitlab_com_users.csv`.
"""
GitLab Users to CSV Script
Purpose: Fetches user data from a GitLab instance API and saves it into a CSV file.
Prerequisites:
* Python 3 installed.
* `requests` library installed (`pip install requests`).
@TheNetJedi
TheNetJedi / newuser-teams.desktop
Created October 16, 2024 05:29
Teams for Linux - Using multiple accounts
#!/usr/bin/env xdg-open
[Desktop Entry]
Name=newuser - Teams
Exec=/opt/teams-for-linux/teams-for-linux --appTitle "newuser - Teams" --customUserDir="/home/$USER/.teams-data/newuser"
Terminal=false
PrefersNonDefaultGPU=false
Icon=teams-for-linux
Type=Application
@TheNetJedi
TheNetJedi / config.fish
Created October 16, 2024 05:27
Fish Shell Basic Config
set -g fish_greeting
# starship prompt - install starship for this to work
if status is-interactive
starship init fish | source
end
# List Directory (install eza for this to work)
alias l='eza -lh --icons=auto' # long list
alias ls='eza -1 --icons=auto' # short list
@TheNetJedi
TheNetJedi / ExportLambdaFunctions.sh
Last active December 24, 2024 17:44
Bash script to download all your Lambda functions.
#!/usr/bin/env bash
#You need to have aws-cli installed and configured
#Credits to Reddit user u/aa93 for the suggestions
mkdir code
aws lambda list-functions | \
grep FunctionName | \
cut -d '"' -f4 | \
while read -r name; do
aws lambda get-function --function-name $name | tail -n 3 | egrep -o 'https?://[^ ]+' | sed 's/"//' | xargs wget -O ./code/$name.zip