Posts

Showing posts from February, 2025

samba journey

 To set up /var/www as a Samba share on your Ubuntu machine and allow file transfers, follow these steps: 1. Install Samba (if not already installed) sudo apt update sudo apt install samba -y 2. Backup the Samba Configuration sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.bak 3. Edit Samba Configuration Open the Samba config file in a text editor: sudo nano /etc/samba/smb.conf Scroll to the bottom and add this section: [www] path = / var /www valid users = youruser browsable = yes writable = yes create mask = 0775 directory mask = 0775 force group = www-data Replace youruser with your actual Ubuntu username. 4. Set Permissions Make sure /var/www has the correct permissions: sudo chown -R youruser:www-data /var/www sudo chmod -R 0775 /var/www 5. Create a Samba User Samba users are separate from system users. Add your user to Samba: sudo smbpasswd -a youruser You'll be prompted to set a password. 6. Restart Samba sudo systemctl restart ...

Ubuntu and Shortcuts

 CTRL - ALT + T    for terminal CTRL - ALT = F3  for terminal login

Nano

To copy/paste via SSH  (1) move to the first line of text you want to copy and press Alt-6.        (Cursor will move down 1 line)   (2) press  Alt-6  again to copy another line, and so on....   (3) move to line of text you want to paste and press Ctrl-U. 

github start project

 Follow these instructions: Ensure the Repository is already created in the github website.  (Add .gitignore for project-type, and MD file) Then: 1. Clone the Repository Open VS Code . Open the Command Palette ( Ctrl + Shift + P or Cmd + Shift + P on Mac). Type "Git: Clone" and select it. Paste the URL: https: //github.com/bendecko/projectname.git Choose a folder where you want to store the project.  IT WILL create the projectname folder Wait for the repository to be cloned, then click Open when prompted. 2. Open the Project Manually (If Needed) If VS Code doesn't prompt you to open the folder: Click File > Open Folder (or Ctrl + K, Ctrl + O ). Navigate to the cloned project directory. Click Open . 3. Install Dependencies (If Required) If it's a Python project, check for requirements.txt or pyproject.toml : pip install -r requirements.txt If it's a Node.js project, check for package.json and run: npm install If it's another type of project, refer...

VScode

CTRL + , is a good one.  For Settings Shift  +  Alt  +  F     For Format All code CTRL + ,  for command window then explorer:compact folders to stop it hiding the empty folders