Skip to content

Instantly share code, notes, and snippets.

View matr1xp's full-sized avatar

marlonsantos.au@gmail.com matr1xp

  • Everywhere
View GitHub Profile
@matr1xp
matr1xp / gist:2bdc841b0eafe31b3bff6fa3889b8ba9
Last active January 22, 2024 09:50
Stable Diffusion v2 on Windows
# Windows Subsystem for Linux (WSL)
# install miniconda 3
# prerequisites latent diffusion - https://github.com/CompVis/latent-diffusion
# Optional: conda install typing-extensions==4.7.1
conda create -n stable_diffusion
conda activate stable_diffusion
@matr1xp
matr1xp / self-signed-certificate.sh
Created September 5, 2023 10:11
Create a self-signed certificate (localhost)
mkdir openssl && cd openssl
openssl req -x509 \
-sha256 -days 356 \
-nodes \
-newkey rsa:2048 \
-subj "/CN=localhost/C=AU/L=Location" \
-keyout rootCA.key -out rootCA.crt
openssl genrsa -out server.key 2048

Contributing

When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.

Please note we have a code of conduct, please follow it in all your interactions with the project.

Pull Request Process

  1. Ensure any install or build dependencies are removed before the end of the layer when doing a
@matr1xp
matr1xp / raspberry_pi_wifi
Last active July 13, 2018 13:11
Raspberry Pi connect to WiFi
auto lo
iface lo inet loopback
iface eth0 inet dhcp
allow-hotplug wlan0
auto wlan0
iface wlan0 inet dhcp
wpa-ssid "ssid"
@matr1xp
matr1xp / tomcat-ssl.txt
Last active September 4, 2017 05:57
Generate self-signed certificate for Tomcat using SpringBoot framework
# Generate self signed certificate:
keytool -genkey -alias tomcat -storetype PKCS12 -keyalg RSA -keysize 2048 -keystore keystore.p12 -validity 3650 \
-ext SAN=dns:my.domain.com,ip:1.1.1.1
# copy keystore.p12 to any of your classpathentry paths, e.g. /src/main/resources.
# Add following to your application.properties file:
server.ssl.key-store=classpath:keystore.p12
@matr1xp
matr1xp / loopback-dht11-ds18b20.py
Last active February 12, 2017 08:57
Push DHT11/DS18B20 sensor data to Loopback API
#!/usr/bin/python
import os, time, datetime, glob
import sys
import requests
import Adafruit_DHT as DHT
dht_sensor = DHT.DHT11
dht_pin = 4
os.system('modprobe w1-gpio')
@matr1xp
matr1xp / raspi-dashboard-node-red
Created February 8, 2017 09:17
Node-RED Raspberry Pi Dashboard
[
{
"id": "277bfe7c.1ba7f2",
"type": "ui_gauge",
"z": "8fb8cb67.969a38",
"name": "",
"group": "e3441e7f.58bb3",
"order": 2,
"width": 0,
"height": 0,
@matr1xp
matr1xp / dht-11-dashboard.json
Created February 4, 2017 13:10
DHT-11 node-red control dashboard - gauges for Temp. and Humidity plus "Speak" action
[
{
"id": "8fb8cb67.969a38",
"type": "tab",
"label": "Flow 3"
},
{
"id": "863bff5.47dcd",
"type": "rpi-dht22",
"z": "8fb8cb67.969a38",
@matr1xp
matr1xp / vm-resize-hard-disk.md
Created February 28, 2016 07:53 — forked from christopher-hopper/vm-resize-hard-disk.md
Resize a Hard Disk for a Virtual Machine provisioned using Vagrant from a Linux base box to run using VirutalBox.

Resize a Hard Disk for a Virtual Machine

Our Virtual Machines are provisioned using Vagrant from a Linux base box to run using VirutalBox. If the Hard Disk space runs out and you cannot remove files to free-up space, you can resize the Hard Disk using some VirtualBox and Linux commands.

Some assumptions

The following steps assume you've got a set-up like mine, where: