Skip to content

Instantly share code, notes, and snippets.

View TeroKeso's full-sized avatar

Tero Keso TeroKeso

View GitHub Profile
@TeroKeso
TeroKeso / Reverse.md
Created October 13, 2024 05:09
How to reverse bootcamp Windows trackpad scroll direction on Mac

By Jason Go

$mode = Read-host "How do you like your mouse scroll (0 or 1)?"; Get-PnpDevice -Class Mouse -PresentOnly -Status OK | ForEach-Object { "$($_.Name): $($_.DeviceID)"; Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Enum\$($_.DeviceID)\Device Parameters" -Name FlipFlopWheel -Value $mode; "+--- Value of FlipFlopWheel is set to " + (Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Enum\$($_.DeviceID)\Device Parameters").FlipFlopWheel + "`n" }
@TeroKeso
TeroKeso / user_package_manage.md
Created August 28, 2024 13:45 — forked from dipaish/user_package_manage.md
User Management in Ubuntu

User Management in Linux

Adding and removing users on a Linux system is crucial for system administration. Typically, you start with just the root account, which has full control but can be risky. It's better to create standard users (with no admin rights) for common tasks. In order to execute commands with superuser privileges, you can either log in as a root user (sudo su , not recommended) or use sudo with your commands (recommended).

To perform admin tasks, Ubuntu has a tool called sudo, allowing you to run commands as other users, including administrators.

Create a New User.

You can use the useradd command to add a new user to the system.

@TeroKeso
TeroKeso / Sovitut-asiat.md
Last active June 10, 2024 07:30
Miettinen
  1. Kotisivujen päivittäminen ja ylläpito

    • Kerran kuussa saa pyytää päivitystä
    • Suositeltu päivitys oikoluku
    • SEO hakusanojen korjaaminen
  2. Hakusanojen läpikäyminen

  • Sähköpostissa
  • Use curl to get the JSON response for the latest release
  • Use grep to find the line containing file URL
  • Use cut and tr to extract the URL
  • Use wget to download it
curl -s https://api.github.com/repos/jgm/pandoc/releases/latest \
| grep "browser_download_url.*deb" \
| cut -d : -f 2,3 \
| tr -d \" \
@TeroKeso
TeroKeso / 00 - A collection of free DNS Servers
Created May 24, 2024 10:31 — forked from kasuken/00 - A collection of free DNS Servers
Set and Reset DNS Settings with PowerShell
A collection of my favorites DNS
@TeroKeso
TeroKeso / Readme.md
Created April 1, 2024 12:03 — forked from saniaky/Readme.md
Docker + nginx-proxy + let's encrypt + watchtower + fail2ban

Complete solution for websites hosting

This gist contains example of how you can configure nginx reverse-proxy with autmatic container discovery, SSL certificates generation (using Let's Encrypt) and auto updates.

Features:

  • Automatically detect new containers and reconfigure nginx reverse-proxy
  • Automatically generate/update SSL certificates for all specified containers.
  • Watch for new docker images and update them.
  • Ban bots and hackers who are trying to bruteforce your website or do anything suspicious.
@TeroKeso
TeroKeso / derper
Last active March 26, 2024 09:10 — forked from amanjuman/derper
TailScale Derper Install on Linux
## Download Go
sudo wget --output-document /opt/go.tar.gz https://go.dev/dl/go1.22.0.linux-amd64.tar.gz
## Remove Existing Go and Extract Downloaded Go
sudo rm -rf /usr/local/go && sudo tar --directory /usr/local --extract --gzip --file /opt/go.tar.gz && sudo rm /opt/go.tar.gz
## Delete Derp if there is & Recreate user for Derper
sudo userdel -r derp & sudo useradd --system --create-home --home-dir /opt/derp --shell /bin/bash derp
@TeroKeso
TeroKeso / How to install.md
Last active March 23, 2024 09:12
Github-copilot-CLI

Mac

brew install gh
gh auth login
gh extension install github/gh-copilot

Windows

@TeroKeso
TeroKeso / Auto-subtitle Ubuntu 20.04 WSL.md
Last active January 24, 2024 12:34
Auto-subtitle(-plus) Ubuntu 20.04 WSL and Windows

Install

sudo apt update && sudo apt install ffmpeg python3-pip 
pip install ffmpeg-python
pip install git+https://github.com/m1guelpf/auto-subtitle.git
@TeroKeso
TeroKeso / VMwareFusion_Export_ovf.txt
Last active November 28, 2024 14:34 — forked from xl7dev/VMwareFusion_Export_ovf.txt
HowTo Export a VM in OVA format in VMware Fusion for OS X
> cd /Applications/VMware\ Fusion\ Tech\ Preview.app/Contents/Library/VMware\ OVF\ Tool
> ./ovftool --acceptAllEulas /Users/$USER/Virtual\ Machines.localized/Windows\ 11\ 64-bit\ Arm\ 2.vmwarevm/Virtual\ Disk.vmx /Users/$USER/export.ova