Skip to content

Instantly share code, notes, and snippets.

View nsxsoft's full-sized avatar
:electron:
On projects

Christian Bacon nsxsoft

:electron:
On projects
View GitHub Profile
@nsxsoft
nsxsoft / codesys_python.md
Created October 6, 2024 19:46 — forked from arwie/codesys_python.md
Fast variable exchange between CODESYS and PYTHON via shared memory

Fast variable exchange between CODESYS and PYTHON via shared memory

A video of this working example is on YouTube and full PYTHON source code and CODESYS project is on GitHub.

Setup on CODESYS side

@nsxsoft
nsxsoft / mount_qcow2.md
Created March 1, 2024 13:15 — forked from shamil/mount_qcow2.md
How to mount a qcow2 disk image

How to mount a qcow2 disk image

This is a quick guide to mounting a qcow2 disk images on your host server. This is useful to reset passwords, edit files, or recover something without the virtual machine running.

Step 1 - Enable NBD on the Host

modprobe nbd max_part=8
@nsxsoft
nsxsoft / com.apple.serviceproxy.sh
Created January 26, 2023 00:24 — forked from jyeary/com.apple.serviceproxy.sh
Commands to Disable com.apple.serviceproxy to allow Docker to run on ports 80 and 443.
# Unload the Service Service
sudo launchctl unload -w /Applications/Server.app/Contents/ServerRoot/System/Library/LaunchDaemons/com.apple.serviceproxy.plist
# Load the Service Service
sudo launchctl load -w /Applications/Server.app/Contents/ServerRoot/System/Library/LaunchDaemons/com.apple.serviceproxy.plist
# Check the status of the Server Service
sudo launchctl list com.apple.serviceproxy
@nsxsoft
nsxsoft / edit_ubuntu_autoinstall.py
Created August 18, 2022 18:05 — forked from utkonos/edit_ubuntu_autoinstall.py
Simple Python Script to Edit an Ubuntu ISO to Add Automated Server Install Capability
import io
import pathlib
import pycdlib
ubuntu = pathlib.Path('ubuntu-22.04-live-server-amd64.iso')
new_iso_path = pathlib.Path('ubuntu-22.04-live-server-amd64-auto.iso')
iso = pycdlib.PyCdlib()
iso.open(ubuntu)
@nsxsoft
nsxsoft / ubuntu-cloud-virtualbox.sh
Created June 17, 2022 12:54 — forked from leogallego/ubuntu-cloud-virtualbox.sh
Ubuntu Cloud images with cloud-init and cloud-config for virtualbox
## Install necessary packages and latest virtualbox
wget -q -O - http://download.virtualbox.org/virtualbox/debian/oracle_vbox_2016.asc | sudo apt-key add -
sudo sh -c 'echo "deb [arch=amd64] http://download.virtualbox.org/virtualbox/debian bionic non-free contrib" >> /etc/apt/sources.list.d/virtualbox.org.list'
sudo apt update
sudo apt install virtualbox-5.2 qemu-utils genisoimage cloud-utils
## get kvm unloaded so virtualbox can load
## WARNING: not needed?
#sudo modprobe -r kvm_amd kvm_intel
#sudo service virtualbox stop
#!/bin/bash
set -e
# REQUIRED ACTION: Configure your backup server vars - see OVH Server Manager's "Backups" tab.
# BACKUP_HOST_PREFIX: use the prefix domain for the listed "Name" value on the "Backups" tab.
# Example: With a 'Name' value `ftpback-bhs1-3.ip-111-222-333.net` you would need to set `BACKUP_HOST_PREFIX=ftpback-bhs1-3`
# Add something likethese to your ~/.bashrc - /etc/profile
#export OVH_SERVER_ID="ns5xxxxx.ip-x-x-x.net"
#export BACKUP_HOST_PREFIX="ftpback-bhs1-x"
@nsxsoft
nsxsoft / large-scale-vue.md
Created February 24, 2022 02:14
Large Scale Vue Application Structure

Large Scale Vue Application Structure

Application Structure LIFT Principle

  • Locating our code is easy
  • Identify code at a glance
  • Flat structure as long as we can
  • Try to stay DRY (Don’t Repeat Yourself) or T-DRY

"Folders-by-Feature" Structure

@nsxsoft
nsxsoft / nginx-config
Created February 15, 2022 03:38
nginx-config
server {
listen 80;
listen [::]:80;
root /var/www/wordpress; # Wordpress Directory
index index.php index.html index.htm;
server_name localhost;
client_max_body_size 100M;
autoindex off;
@nsxsoft
nsxsoft / 20211210-TLP-WHITE_LOG4J.md
Created December 13, 2021 16:05 — forked from SwitHak/20211210-TLP-WHITE_LOG4J.md
BlueTeam CheatSheet * Log4Shell* | Last updated: 2021-12-12 2204 UTC

Security Advisories / Bulletins linked to Log4Shell (CVE-2021-44228)

Errors, typos, something to say ?

  • If you want to add a link, comment or send it to me
  • Feel free to report any mistake directly below in the comment or in DM on Twitter @SwitHak

Other great ressources

@nsxsoft
nsxsoft / LICENSE.md
Created April 1, 2021 04:30 — forked from davefp/LICENSE.md
Weather Widget for Dashing

The MIT License (MIT)

Copyright (c) 2014 David Underwood

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: