Skip to content

Instantly share code, notes, and snippets.

View samuelloza's full-sized avatar
🏠
Working from home

Samuel Loza samuelloza

🏠
Working from home
View GitHub Profile
@samuelloza
samuelloza / README-setup-tunnel-as-systemd-service.md
Created March 6, 2023 15:25 — forked from drmalex07/README-setup-tunnel-as-systemd-service.md
Setup a secure (SSH) tunnel as a systemd service. #systemd #ssh #ssh-tunnel #ssh-forward

README

Create a template service file at /etc/systemd/system/[email protected]. The template parameter will correspond to the name of target host:

[Unit]
Description=Setup a secure tunnel to %I
After=network.target
@samuelloza
samuelloza / gist:1fe6274eb55cde998a9e613f8a06fdbe
Created February 22, 2023 12:13 — forked from joulgs/terminal.txt
How install libssl1.1 on ubuntu 22.04
wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4_amd64.deb
sudo dpkg -i libssl1.1_1.1.0g-2ubuntu4_amd64.deb
@samuelloza
samuelloza / cli.js
Created October 11, 2022 02:24 — forked from AnishDe12020/cli.js
Medium - Getting Started with React Ink
#!/usr/bin/env node
'use strict';
const React = require('react');
const importJsx = require('import-jsx');
const {render} = require('ink');
const meow = require('meow');
const ui = importJsx('./ui');
const cli = meow(`
Usage
$ sandbox
@samuelloza
samuelloza / bridged-networking-on-wireless-interface-with-kvm.md
Created June 22, 2021 02:58 — forked from Jiab77/bridged-networking-on-wireless-interface-with-kvm.md
Bridged Networking on Wireless Interface with KVM and more...

Bridged Networking on Wireless Interface with KVM and more...

So I needed to upgrade my home "web hosting" server from a Raspberry Pi 3b to something more flexible where I could even simulate a Raspberry Pi 3b given power. The new server hardware is now an Intel NUC i7 16GB / 250Gb SSD NVME. 😁

I order to accomplish this task I had to find a way to bridge the wireless interface which is the faster one on my actual home network setup.

I've also tried to mix the functionnality from another Rapsberry Pi (3b+ this time) who's acting as WLAN to LAN bridge. More details on this setup. But this was finally a bad idea and I was not able to make it work along the virtual network bridge created by libvirt or manually created... (I will explain why later)

The main difficulty was to use the DMZ IP address given by the router and route the traffic to the guest VM's.

Server / Desktop

Serial Keys:
YV54A-2ZW5P-M887Y-UWXNE-QPUXD
VY3R2-0NW0L-H845Q-TDMXT-XQAT0
VC7JR-A0Z97-08EGZ-M4YNV-XVHD0
FC1TU-4RGEQ-084EP-2XQQX-ZGHWA
CU1WA-8HGEN-M815Z-HQP5E-QKADF
AY7D0-FTG44-H846Y-2XPGV-P32T8
@samuelloza
samuelloza / vcl-regex-cheat-sheet
Created August 7, 2018 00:46 — forked from dimsemenov/vcl-regex-cheat-sheet
Regular expression cheat sheet for Varnish (.vcl). Examples of vcl regexp. Found here http://kly.no/varnish/regex.txt (by Kristian Lyngstøl)
Regular expression cheat sheet for Varnish
Varnish regular expressions are NOT case sensitive. Varnish uses POSIX
regular expressions, for a complete guide, see: "man 7 regex"
Basic matching:
req.url ~ "searchterm"
True if req.url contains "searchterm" anywhere.
req.url == "searchterm"
@samuelloza
samuelloza / Crontab.class.php
Last active January 7, 2018 23:23 — forked from gustavgenberg/Crontab.class.php
Easy crontab manager for PHP. Uses shell_exec!
<?php
class Crontab {
/*
(c) Gustav Genberg 2017
This script uses PHP shell_exec! Make sure it is enabled before using!
Also make sure that the user running this script (usually www-data) have access to the crontab command!