Quick instructions on how to create a simple systemd user service for a program or script.
1- Identify the script or program/binary that you will be using
2- Create a systemd unit file using the example below, give it a name that will make sense to you with a .service extension (like [my_service].service), and save it to $USER/.config/systemd/user
After commuting close to 1000kms a week for 6 years, I have decided to the the leap and move to Toronto. After all, I was here around 4 nights a week, and having to commute back and forward between Mississauga and Toronto had become a hassle. This would also increase my work drive (from 85kms each way to 115kms), but luckily my client agreed for me to work remote 4 days of the week, with made my move even more possible.
Seeing how I would be working from home most of the week, and how my office would be in the living room of our new place, I needed a space that not only was functional, but that could hold my three 27” monitors have have a clean look. I also wanted a standing desk because I can no longer get used to sitting the whole day.
After searching pinterest and online for ideas, I finally had a plan and knew what parts I would need.
And here’s the final work:
The Wall
The space I had was perfect. The back wall has the length of 64”, with 4 wood studs distributed evenly with 16” of space. The side wall had a stud 13” away from the corner, and another stud 16” away from it. I needed to leave space for the cabling since I did not want to bring it through the wall. Space was needed on the left for my NAS cables to go through, and in the middle for the cables coming down from the monitors, LEDs and keyboard and mouse.
The Monitor Mount
For the monitors I purchased the 3x mounts below on Amazon. I have the two main monitors mounted to a piece of plywood, which is in turn attached to the wall.
I’m using a custom bash script running on the background that checks if my monitors are on or off, and turns on the lights via curl commands to a Wemo Switch:
This is the easiest one, as long as you have Python on that system. Just run the commands below and you are set. If you have an index file on that folder, Python will display, otherwise it will do a directory listing.
$ python -m SimpleHTTPServer 8888
Serving HTTP on 0.0.0.0 port 8888 ...
Using HTTPS/SSL
And you can also create aN SSL enabled listener with Python. For this test, you will need to have the certificate and key in pem format.
So you are trying to load GitLab inside another page via iframe, and you are not able to. Due to security reasons, this is default behavior for GitLab, and as per the project (see issue 2347, this will not change, and I agree).
However for some internal users this might not be the best approach, so here’s how to enable it.
Browse to your install directory and go to your ‘nginx’ folder. If you are not sure where it is, with your GitLab instance running, use the following command (assuming you are using port 8888).
Browse to the config folder and edit the ‘gitlab-http.conf’
# cd /var/opt/gitlab/nginx/conf
# vim gitlab-http.conf
Add the line proxy_hide_header X-Frame-Options;in thelocation /` code block
location / {
## Serve static files from defined root folder.
## @gitlab is a named location for the upstream fallback, see below.
try_files $uri $uri/index.html $uri.html @gitlab;
}
proxy_hide_header X-Frame-Options;
Comment the line proxy_hide_header X-Frame-Options; if present
location @gitlab {
## If you use HTTPS make sure you disable gzip compression
## to be safe against BREACH attack.
## https://github.com/gitlabhq/gitlabhq/issues/694
## Some requests take more than 30 seconds.
proxy_read_timeout 300;
proxy_connect_timeout 300;
proxy_redirect off;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Frame-Options SAMEORIGIN;
#proxy_hide_header X-Frame-Options;
proxy_pass http://gitlab;
}