Skip to content

Instantly share code, notes, and snippets.

View souhaiebtar's full-sized avatar
:octocat:
Focusing

souhaiebtar

:octocat:
Focusing
View GitHub Profile
@souhaiebtar
souhaiebtar / microsoft_store_required_services.md
Created March 8, 2026 15:53
[microsoft store services] microsoft store services #windows

Service name Startup type Logon As Microsoft Account Sign-in Assistant Manual Local System account Windows License Manager Service Manual Local Service Windows Update Manual Local System account Background Intelligent Transfer Service Manual Local System account Web Account Manager Manual Local System account


@souhaiebtar
souhaiebtar / regular expression.md
Last active February 26, 2026 12:25
[regular expression]regular expression #regex

search for print that does not # before and space before or after #

^(?![\s]*#).*\bprint
@souhaiebtar
souhaiebtar / Microsoft.PowerShell_profile.ps1
Created January 31, 2026 10:37
[powershell profile wrk cpnfig] powershell profile wrk config d31m1y2026 #powershell #windows
# fnm completion related
using namespace System.Management.Automation
using namespace System.Management.Automation.Language
# end fnm completion related
# Import modules
Import-Module Terminal-Icons
Import-Module PSReadLine
Import-Module posh-git
Import-Module posh-sshell
@souhaiebtar
souhaiebtar / git_alias.md
Created January 30, 2026 21:32
[git alias]git alias #git #alias

git config --global alias.undo '!git reset --hard HEAD^ && git clean -df'

git config --global alias.stash-all '!f() { git stash push --include-untracked -m "$(date +"%Y-%m-%d %H:%M:%S")"; }; f'

@souhaiebtar
souhaiebtar / main.spec
Created January 29, 2026 16:04
[pyinstaller spec] pyinstaller spec #python #pyinstaller
# -*- mode: python ; coding: utf-8 -*-
import os
from PyInstaller.utils.hooks import collect_all
datas = []
binaries = []
hiddenimports = ['customtkinter', 'darkdetect', 'utils', 'utils.path_resolver', 'utils.subprocess_utils', 'utils.pdf_processor']
tmp_ret = collect_all('customtkinter')
datas += tmp_ret[0]; binaries += tmp_ret[1]; hiddenimports += tmp_ret[2]
@souhaiebtar
souhaiebtar / clipboard.sh
Last active November 16, 2025 08:54
[clipboard tool linux] clipboard tool linux #clipboard #history #linux
download greenclip from https://github.com/erebe/greenclip/releases
put `greenclip` in $PATH (i did put it in /usr/bin)
under ~/.config, create 1 file `.config/greenclip.toml`
*.config/greenclip.toml*
```BASH
[greenclip]
blacklisted_applications = []
@souhaiebtar
souhaiebtar / curl_lm_studio.sh
Created August 5, 2025 17:28
[curl_lm_studio.sh] curl_lm_studio.sh #ia #llm #lm #curl
curl http://localhost:1234/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "gemma-3n-e2b-it",
"messages": [
{ "role": "system", "content": "Always answer in rhymes. Today is Thursday" },
{ "role": "user", "content": "What day is it today?" }
],
"temperature": 0.7,
"max_tokens": -1,
@souhaiebtar
souhaiebtar / uv_tool_cheat_sheet.md
Created July 21, 2025 08:29
[uv tool python] uv tool python cheat sheet #python

Install only the dev group (without base dependencies):

uv sync --only-group dev Install multiple groups at once:

uv sync --group dev --group prod Install all groups:

uv sync --all-groups

@souhaiebtar
souhaiebtar / windows_terminal_config.json
Created July 20, 2025 10:08
[windows terminal config] windows terminal config #msys #linux
{
"$help": "https://aka.ms/terminal-documentation",
"$schema": "https://aka.ms/terminal-profiles-schema",
"actions":
[
{
"command":
{
"action": "copy",
"singleLine": false
@souhaiebtar
souhaiebtar / ssh_config_key.sh
Created June 30, 2025 10:34
[ssh config] ssh config #ssh #config
To configure your .ssh/config file to use two different GitHub accounts with separate SSH keys, follow these steps based on best practices:
Generate distinct SSH key pairs for each GitHub account, if you haven't already, for example:
ssh-keygen -t rsa -C "email_for_account1@example.com" -f ~/.ssh/id_rsa_account1
ssh-keygen -t rsa -C "email_for_account2@example.com" -f ~/.ssh/id_rsa_account2
Add the SSH keys to the ssh-agent:
ssh-add ~/.ssh/id_rsa_account1
ssh-add ~/.ssh/id_rsa_account2
Configure your ~/.ssh/config file with Host aliases pointing to GitHub but specifying different IdentityFiles: