Skip to content

Instantly share code, notes, and snippets.

View YasienDwieb's full-sized avatar

Yasien Dwieb YasienDwieb

View GitHub Profile
@YasienDwieb
YasienDwieb / xdebug.ini
Created June 27, 2020 15:05
XDebug tested config
[xdebug]
xdebug.remote_enable=on
xdebug.remote_mode=req
xdebug.remote_autostart=1
xdebug.remote_log="/var/log/xdebug.log"
xdebug.remote_host=localhost
xdebug.remote_handler=dbgp
xdebug.remote_port=9000
@YasienDwieb
YasienDwieb / .docker-aliases
Created January 9, 2023 13:24
Delete docker containers and images by prefix of the name
# Stop and delete all containers matching the provided prefix
# Usage: $ drmall redis
drmall(){
docker ps -a --filter "name=$1*" --format="{{ .Names }}" | xargs docker rm -f {}
}
# Stop and delete all image with repository name matching the provided prefix
# Usage: $ drmiall redis
drmiall(){
docker images --filter "reference=$1*" --format="{{ .ID }}" | xargs docker rmi {}
@YasienDwieb
YasienDwieb / create-desktop-entry-for-AppImage-on-linux
Last active February 10, 2024 18:59
Create an application launcher for AppImage apps
Place following content with edits in the correct path in a similar directory:
~/.local/share/applications/application.desktop
[Desktop Entry]
Name=App name to be shown
Exec=/opt/apps/app-dir/app.AppImage
Type=Application
Icon=/opt/apps/app-dir/logo.png
@YasienDwieb
YasienDwieb / README.md
Created January 2, 2026 07:00
Cleanup Stuck Snap applications

Complete Snap Removal Script

A bash script to completely remove stuck snaps from Ubuntu/Linux systems when normal snap remove fails.

Problem

Sometimes snap remove fails and leaves snaps in a broken state with stuck changes in snapd's internal database. Common errors include:

error: snap "package-name" has "remove-snap" change in progress