Skip to content

Instantly share code, notes, and snippets.

View Kambaa's full-sized avatar

KambaAbi Kambaa

  • KambaAbi
  • Istanbul, Turkey
View GitHub Profile
@Kambaa
Kambaa / ollama-webui-config-readme.md
Last active February 1, 2025 15:34
Web UI configuration for Ollama on windows

Ollama Web UI(running on WSL Docker) Config With Ollama running on Windows:

I have installed docker on my WSL linux machine, and i have already been using ollama on windows. With these setup in mind i wrote this gist for future reference.

When you run ollama-webui on docker on wsl and your ollama already running on windows machine, webui can not connect to ollama running on windows. For it to work you need to take these steps:

Make Ollama on Windows accessible on network:

Default makes ollama only accessible via localhost(127.0.0.1). To make it accessible on any network devices on the Windows machine, you need to add an environment variable named OLLAMA_HOST with value of 0.0.0.0. Check out the example below:

resim

@Kambaa
Kambaa / 0-add-passwordless-sudo-user-README.md
Last active January 28, 2025 21:16
add-passwordless-sudo-user

Add passworddless sudo user via ansible for Ubuntu 22.04 VM's(for personal uses/learning purposes only)

For my learning environment, i needed to quickly and correctly add a passwordless sudo user(for Ubuntu 22.04 VM), since i'm learning ansible, i decided to write the necessary inventory and playbook file, after that i decided to make it customizable via a bash script. User can enter the new user details(name and password) and machine ssh connection information (ip, username and password). And this script first tests the connection via ansible's ping module, after successful operation, asks user to run the generated playbook(or exit and show the command to run the playbook)

These bash scripts:

  • install python3,pip and sshpass(for ansible), and install ansible via pip
  • asks user to enter the new user details (username and password) to generate the ansible playbook
  • asks user to enter the remote machine information to generate the ansible inventory
  • pings the inventory machines
@Kambaa
Kambaa / My Ansible Learning Notes on an Ubuntu Server 22.04 VM .md
Last active January 18, 2025 14:40
My Ansible Learning Notes on an Ubuntu Server 22.04 VM

My Ansible Learning Notes on an Ubuntu Server 22.04 VM

What is Ansible:

A tool/way to automotize operations done in machine environments.

Installation:

First install ansible with sudo apt install ansible -y and then check it with ansible --version. This is my version info:

osboxes@jumphost:~/ansible-tutorial$ ansible --version
ansible 2.10.8
@Kambaa
Kambaa / kubeadm-cluster-installation-steps.md
Last active January 7, 2025 10:25
Kubernetes Installation Steps on Ubuntu Server 24.04 (tested with virtualbox osboxes image)

Kubernetes Cluster Installation Steps

1. osboxes ubuntu-server virtualbox image settings:

sudo dpkg-reconfigure keyboard-configuration

70 for generic keyboard 93 for Turkish layout (press 1 for the other defaults)

2. Prerequisites:

@Kambaa
Kambaa / Wake On Lan Clients.md
Last active January 1, 2025 19:10
Wake on lan script for Windows And Linux

How to use Wake On Lan (WOL):

For windows:

Save the script below to a file named Wol.ps1. Change the mac address of your machine accordingly.


# Function to send Wake-on-LAN (WoL) Magic Packet
function Send-WoL {
    param (
@Kambaa
Kambaa / key-binding.json
Created December 24, 2024 17:59
Sublime Key configs
[
{ "keys": ["alt+d"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Line.sublime-macro"} },
{ "keys": ["ctrl+d"], "command": "duplicate_line" },
{ "keys": ["ctrl+shift+c"], "command": "toggle_comment", "args": { "block": false } },
{ "keys": ["ctrl+space+down"], "command": "select_lines", "args": {"forward": true} },
{ "keys": ["ctrl+space+up"], "command": "select_lines", "args": {"forward": false}},
{ "keys": ["shift+alt+f"], "command": "reindent", "args": {"single_line": false} } ,
{ "keys": ["shift+alt+f"], "command": "pretty_json" ,
@Kambaa
Kambaa / profile-example.md
Last active November 5, 2024 08:47
Windows powershell profile (like bashprofile) settings.
Clear-Host
# tab auto completion for git commands
# Install with:  PowerShellGet\Install-Module posh-git -Scope CurrentUser -Force
# more on website: https://github.com/dahlbyk/posh-git?tab=readme-ov-file#installation
Import-Module posh-git
oh-my-posh init pwsh | Invoke-Expression


function QuitReplacement{
@Kambaa
Kambaa / postgres-increase-max-conn-docker.md
Created August 9, 2024 23:29
How to increate max connections on postgres on docker

edit your docker-compose.yml file:

services:
  database:
    image: postgres:latest
    command: postgres -c 'max_connections=250'

SOURCE:

@Kambaa
Kambaa / ntfy-notes.md
Created August 8, 2024 19:32
My NTFY notes
@Kambaa
Kambaa / My Cas 6.6.x Notes.md
Last active February 10, 2025 09:11
My CAS 6.6.x Setup Notes

My notes on CAS server installation when learning it. Hope it will be helpful to somebody.

[Update 2025] Because CAS documentation site deprecates and removes the older versions, i've fetched and hosted the 6.6.X version docs to my domain.

Initial/Basic setup.