Skip to content

Instantly share code, notes, and snippets.

View TeroKeso's full-sized avatar

Tero Keso TeroKeso

View GitHub Profile
@TeroKeso
TeroKeso / nextcloud_fail2ban.md
Created April 7, 2020 15:09 — forked from GAS85/nextcloud_fail2ban.md
Harden Nextcloud 17+ with Fail2Ban, GUI and WebDAV - Ubuntu 18.04

Short how-to harden your Nextcloud Server with Fail2Ban

Install fail2ban:

sudo apt update && sudo apt install fail2ban -y

Create the Nextcloud-filter:

sudo nano /etc/fail2ban/filter.d/nextcloud.conf
@TeroKeso
TeroKeso / nextcloud_fail2ban.md
Created April 7, 2020 15:09 — forked from GAS85/nextcloud_fail2ban.md
Harden Nextcloud 17+ with Fail2Ban, GUI and WebDAV - Ubuntu 18.04

Short how-to harden your Nextcloud Server with Fail2Ban

Install fail2ban:

sudo apt update && sudo apt install fail2ban -y

Create the Nextcloud-filter:

sudo nano /etc/fail2ban/filter.d/nextcloud.conf
@TeroKeso
TeroKeso / - Syncthing + start on boot.md
Created July 15, 2020 12:57 — forked from hdml/- Syncthing + start on boot.md
How to install Syncthing on Raspberry Pi + start on boot [semi-automatic]

##Run install_syncthing.sh

$ curl -s https://gist.githubusercontent.com/hdml/7b079c114d3e20bf69f1/raw/1cd3647b1db4f80726c145fba725e27993a7fcdb/install_syncthing.sh | sudo bash

Start syncthing

$ syncthing

Wait until you get something like:

@TeroKeso
TeroKeso / tmux_vs_screen.md
Created November 12, 2020 16:29 — forked from P7h/tmux_vs_screen.md
tmux vs screen commands

tmux vs. screen commands


Action tmux screen
start a new session tmux
tmux new
tmux new-session
screen
start a new session with a name tmux new -s name screen -S name
re-attach a detached session tmux attach
tmux attach-session
screen -r
re-attach a detached session with a name tmux attach -t name
tmux a -t name
screen -r name
re-attach an attached session (detaching it from elsewhere) tmux attach -dtmux attach-session -d screen -dr
@TeroKeso
TeroKeso / .screenrc
Created November 12, 2020 16:35 — forked from joaopizani/.screenrc
A killer GNU Screen Config
# the following two lines give a two-line status, with the current window highlighted
hardstatus alwayslastline
hardstatus string '%{= kG}[%{G}%H%? %1`%?%{g}][%= %{= kw}%-w%{+b yk} %n*%t%?(%u)%? %{-}%+w %=%{g}][%{B}%m/%d %{W}%C%A%{g}]'
# huge scrollback buffer
defscrollback 5000
# no welcome message
startup_message off

Installation of basic programs (HAMK BYOD) in students' personal devices (Windows).

The following guidelines utilizes the chocolatey package manager for Windows to install several applications that are used in different modules in HAMK.

Step 1: Install CHOCOLATEY

Requirements

  • Windows 7 or newer version of Windows Operating System (Recommended Windows 10 or 11)
  • PowerShell v2+
  • .NET Framework 4+
@TeroKeso
TeroKeso / 1) Net use.md
Last active August 12, 2022 13:07
Windows tehtävä 1-2

Open CMD. IF CMD is running with administrator rights it will not appear in windows

NET USE k: \\23.101.69.47\c$ /USER:paakayttaja


k:

cd helppo
@TeroKeso
TeroKeso / DNS_TO_LOCALHOST.markdown
Created September 17, 2021 07:18 — forked from tinogomes/DNS_TO_LOCALHOST.markdown
Public DNS Pointing to localhost (127.0.0.1)

Available Public Wildcard DNS Domains pointing to localhost (127.0.0.1)

It turns out that some kind hearted people already set up wildcard domains for you already. You can use any domain below and/or any subdomain of these and they currently resolve to 127.0.0.1 but could switch at any time to resolve somewhere else. Here's the list of ones I know about. Let me know if there are more!

  • localhost - It will always works. Do you know why? I hope so.
  • [*.]fuf.me - Managed by @fidian; it will always point to localhost for IPv4 and IPv6
  • [*.]fbi.com - 👏 👏 👏 👏 👏
  • [*.]localtest.me
  • [*.]127-0-0-1.org.uk
  • [*.]vcap.me
@TeroKeso
TeroKeso / 1_nvidia.md
Last active March 11, 2022 14:17
Nvidia

Kaiken poistaminen

    sudo apt purge cuda*
    sudo apt purge nvidia*
    sudo apt purge libnvidia*
    sudo apt autoremove

Pika-asennus Docker (Beta)

     curl -fsSL https://get.docker.com -o get-docker.sh

sudo sh ./get-docker.sh

@TeroKeso
TeroKeso / Tailscale_inside_WSL2.md
Last active June 17, 2022 19:52
Tailscale inside WSL2

Tailscale works with WSL2

1) sudo nano /etc/hostname
2) exit
3) install tailscale "curl -fsSL https://tailscale.com/install.sh | sh"
4) sudo tailscaled &
5) sudo tailscale up
5.5) sudo tailscale up #if needed
6) sudo tailscale status