Skip to content

Instantly share code, notes, and snippets.

View MParvin's full-sized avatar

Mohammad Parvin MParvin

View GitHub Profile
@MParvin
MParvin / privoxy-docker-compose.yml
Created February 14, 2026 08:50
Privoxy in docker
services:
privoxy:
image: vimagick/privoxy
restart: always
volumes: ["./privoxy:/etc/privoxy"]
ports: ["8118:8118"]
@MParvin
MParvin / docker-compose.yml
Created February 12, 2026 13:52
AI-Stack
services:
ollama:
image: ollama/ollama:latest
container_name: ollama
restart: unless-stopped
ports:
- "11434:11434"
deploy:
resources:
reservations:
@MParvin
MParvin / docker.repo
Created February 12, 2026 13:08
Docker repostiory for Oracle Linux
[docker-ce-stable]
name=Docker CE Stable - $basearch
baseurl=https://download.docker.com/linux/rhel/$releasever/$basearch/stable
enabled=1
gpgcheck=1
gpgkey=https://download.docker.com/linux/rhel/gpg
[docker-ce-stable-source]
name=Docker CE Stable - Sources
baseurl=https://download.docker.com/linux/rhel/$releasever/source/stable
@MParvin
MParvin / gist:bf124708d3a79adeca91947c15bfaf69
Created February 12, 2026 11:45
Flatpak doesn't have any program - Fixed
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
@MParvin
MParvin / install_gnome_freebsd.yml
Created August 12, 2025 10:39
Ansible playbook to install Gnome on Freebsd 14.3
---
- name: Install and configure GNOME desktop on FreeBSD 14.3
hosts: freebsd
become: yes
vars:
desktop_user: {{ ansible_user }}
video_driver: i915kms # Options: i915kms, amdgpu, radeonkms, nvidia-modeset
wayland_enabled: false
tasks:
@MParvin
MParvin / my_aliases
Last active February 12, 2026 16:15
My Aliases and functions
alias zource='source ~/.zshrc'
alias vourse='source .venv/bin/activate'
# Wrong command as alias
alias sl='ls'
alias greo='grep'
# SSH key aliases
#alias myKey='cat ~/.ssh/id_ed25519.pub | xclip -selection c && echo "key copied to clipboard"'
alias myKey='cat ~/.ssh/id_ed25519.pub | /usr/bin/pbcopy && echo "key copied to clipboard"'
@MParvin
MParvin / add_my_ssh_keys.sh
Last active March 24, 2025 04:08
Add my ssh keys to authorized_keys in home directory
#!/bin/bash -exu
my_user=$(whoami)
my_group=$(groups | awk '{print $1}')
mkdir -p ~/.ssh
chown $my_user:$my_group ~/.ssh
chmod 700 ~/.ssh
curl -SsL github.com/mparvin.keys > ~/.ssh/authorized_keys
chown $my_user:$my_group ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys
@MParvin
MParvin / push_images.sh
Last active October 23, 2024 21:43
Push all Containerd images
#!/bin/bash
if [ -z "$1" ]
then
echo "Usage: $0 <repo>"
exit 1
fi
repo=$1
@MParvin
MParvin / is-free-ir-domain.py
Created October 12, 2024 20:58
Effortlessly monitor the availability of .ir domains and receive instant notifications when they become free—no external dependencies required.
#!/usr/bin/env python
import sys
import requests
import os
def read_config():
with open(".env", "r") as f:
config = {}
@MParvin
MParvin / gen_ssl.sh
Last active November 5, 2024 09:46
Generate self-signed SSL
#!/bin/bash
if [ -z "$1" ]; then
echo "Error: No domain name provided."
echo "Usage: $0 <domain>"
exit 1
fi
######## Variables ########
DOMAIN="$1"