Skip to content

Instantly share code, notes, and snippets.

View gpatsiaouras's full-sized avatar

Giorgos Patsiaouras gpatsiaouras

  • The Hague, Netherlands
View GitHub Profile
@gpatsiaouras
gpatsiaouras / example_bash_script
Created November 28, 2023 15:07
Example bash script
#!/bin/bash
#==============================================================================
#title :example_bash_script
#description :This script is an example of some basic functions
#author :John Doe
#organization :My example organization
#date :20231128
#==============================================================================
@gpatsiaouras
gpatsiaouras / FlySkyI6USBPPM.ino
Created October 22, 2021 09:07
Flysky i6 ppm to Joystick converter
#include <PPMReader.h>
#include <Joystick.h>
Joystick_ Joystick(JOYSTICK_DEFAULT_REPORT_ID, JOYSTICK_TYPE_GAMEPAD,
4, 0, // Button Count, Hat Switch Count
true, true, false, // X, Y, Z Axis
true, true, false, // Rx, Ry, Rz
true, true, // rudder or throttle
false, false, false); // accelerator, brake, or steering
@gpatsiaouras
gpatsiaouras / gist:6686e2b816b81255725a71b1452b691e
Last active December 3, 2021 09:04
x11vnc.service - Setting up a vnc server specifically for the active session on ubuntu
[Unit]
Description=VNC Server for X11
Requires=display-manager.service
After=syslog.target network-online.target ##optional for better performance
Wants=syslog.target network-online.target ##optional for better performance
[Service]
ExecStart=/usr/bin/x11vnc -display :0 -auth guess -forever -loop -noxdamage -repeat -rfbauth /home/<my-user>/.vnc/passwd -rfbport 5900 -shared
ExecStop=/usr/bin/x11vnc -R stop
Restart=on-failure
@gpatsiaouras
gpatsiaouras / vbox_vm_start@.service
Created June 7, 2021 08:01
Starts/Stops a virtual box machine properly on boot/restart/shutdown
[Unit]
Description=VirtualBox VM %I
After=network.target vboxdrv.service
Before=runlevel2.target shutdown.target
[Service]
User=<my-user>
Group=vboxusers
Type=forking
Restart=no
@gpatsiaouras
gpatsiaouras / vncserver@.service
Created June 7, 2021 07:58
VNC Server systemd service
[Unit]
Description=Start TightVNC server at startup
After=syslog.target network.target
[Service]
Type=forking
User=<my-user>
Group=<my-user>
WorkingDirectory=/home/<my-user>