Skip to content

Instantly share code, notes, and snippets.

View TeroKeso's full-sized avatar

Tero Keso TeroKeso

View GitHub Profile
  • 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 / 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
@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 / 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" }