Skip to content

Instantly share code, notes, and snippets.

@Peregrinox
Peregrinox / alternative ssh port.md
Last active March 12, 2019 13:11
alternative ssh port in google compute instance
@Peregrinox
Peregrinox / install python 3.7 on osmc
Created January 24, 2019 12:15
install python 3.7 on osmc
https://www.ramoonus.nl/2018/06/30/installing-python-3-7-on-raspberry-pi/
https://gist.github.com/SeppPenner/6a5a30ebc8f79936fa136c524417761d
@Peregrinox
Peregrinox / golang on osmc
Created January 24, 2019 11:37
golang on osmc.md
version=go1.11.5.linux-armv6l.tar.gz
wget https://dl.google.com/go/$version
sudo tar -C /usr/local -xvf $version
cat >> ~/.bashrc << 'EOF'
export GOPATH=$HOME/go
export PATH=/usr/local/go/bin:$PATH:$GOPATH/bin
EOF
source ~/.bashrc
@Peregrinox
Peregrinox / Install docker osmc.md
Last active November 15, 2024 20:12
Install docker in osmc on pi

source: Docker en Raspberry Pi

Check version, release and keyname of OS:

$ cat /etc/debian_version
9.5
$ cat /etc/os-release
ID=osmc
@Peregrinox
Peregrinox / kodi commands.md
Last active July 6, 2018 06:56
task with kodi shell commands

Send a message to Kodi (XBMC) https://discourse.osmc.tv/t/push-notification-from-bash-to-kodi/5703/2

curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"GUI.ShowNotification","params":{"title":"This is the title of the message","message":"This is the body of the message"},"id":1}' http://localhost:8080/jsonrpc

or

xbmc-send -a "Notification(My header,This is my message)"
@Peregrinox
Peregrinox / git bash ssh agent.md
Last active August 27, 2024 03:13
configure your git bash to run agent on start
@Peregrinox
Peregrinox / ddclient dynamic dns debian.md
Last active March 22, 2018 13:58
install and configure ddcliento for dynamic DNS update
@Peregrinox
Peregrinox / dependable mount with systemd.md
Last active October 5, 2024 20:41
Use Systemd mount units to mount partitions that depend on previous init tasks

https://oguya.ch/posts/2015-09-01-systemd-mount-partition/ https://unix.stackexchange.com/questions/246935/set-systemd-service-to-execute-after-fstab-mount

This started because the fuse mounts on /etc/fstab didn´t process right the "nofail" options and the init of the server will fail if external drive are not present. So I need some alternative command to "dependable" automount some folders or partitions.

find the service that auto-mounts your device

systemctl list-units | grep '/media/Elements' | awk '{ print $1 }'
@Peregrinox
Peregrinox / install gogs on osmc stretch.md
Last active April 6, 2018 09:58
Install and configuration of gogs.io
@Peregrinox
Peregrinox / unrar osmc stretch.md
Last active June 18, 2021 06:11
install unrar non-free on osmc (debian stretch)

Add contrib non free to sources:

$ sudo nano /etc/apt/sources.list
deb http://ftp.us.debian.org/debian/ stretch main contrib non-free
deb-src http://ftp.us.debian.org/debian/ stretch main contrib non-free

deb http://security.debian.org/debian-security stretch/updates main contrib non-free