Skip to content

Instantly share code, notes, and snippets.

View jsjolund's full-sized avatar

Johannes Sjölund jsjolund

View GitHub Profile
@jsjolund
jsjolund / Morrowind MWSE Linux Wine.md
Last active July 11, 2023 17:55
Install Morrowind MWSE mods on Linux with Wine

Read on Steam Community Guides

How to install Morrowind MWSE mods on Linux

In this Linux tutorial, we use Wine to install vanilla Morrowind mods that require MWSE. It works on both the GOG and Steam versions of Morrowind.

These instructions should work on most Linux distributions. They have been tested on:

  • Arch Linux with Wine 8.11
  • Debian Bookworm (12) and Wine 8.0
@jsjolund
jsjolund / sierpinski.html
Created June 25, 2023 20:44
This HTML file contains JavaScript code that generates a Sierpinski Gasket with 5 iterations of triangles.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Sierpinski Gasket with JavaScript</title>
<style>
.small { fill: none; stroke: black; stroke-width: 1; }
</style>
</head>
@jsjolund
jsjolund / Dockerfile
Last active June 29, 2023 23:41
Dockerfile for running llama.cpp with Nvidia cuBLAS support
ARG CUDA_VERSION=12.1.1-devel-ubuntu22.04
FROM nvidia/cuda:${CUDA_VERSION}
# Set environment variables
ENV DEBIAN_FRONTEND=noninteractive \
SHELL=/bin/bash
# Set locale
RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen
@jsjolund
jsjolund / Dockerfile
Last active June 6, 2024 00:37
Dockerfile for running lollms-webui with Nvidia cuBLAS support
FROM nvcr.io/nvidia/cuda:12.1.1-cudnn8-devel-ubuntu22.04
# Set environment variables
ENV DEBIAN_FRONTEND=noninteractive\
SHELL=/bin/bash\
PATH="/opt/venv/bin:$PATH"
RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen
# Install apt packages
#!/usr/bin/env python3
# kairosdb-downloader
# This Python code is an example of how to download metrics from KairosDB and plot them using matplotlib. Run it with:
# python plot_kairosdb.py
import json
from datetime import datetime
import matplotlib.dates as md

a00r00wst01

hostname Zabbix name Zabbix key
a00r00wst01 Absolute Humidity - Actual -humidity-type.absolute-function.actual-location.outdoor
a00r00wst01 Absolute Pressure - Actual -pressure-type.absolute-function.actual-location.outdoor
a00r00wst01 Air Density -density-location.outdoor
a00r00wst01 Compass direction -direction-source.compass-location.outdoor
a00r00wst01 Dew Point - Actual -dewpoint-function.actual-location.outdoor
a00r00wst01 Global Radiation - Actual -radiation-type.global-function.actual-location.outdoor
a00r00wst01 Heating Temperature R2S -temperature-type.heating-location.outdoor-source.r2s
[package]
edition = "2021"
name = "hello-wasm"
version = "0.1.0"
[lib]
crate-type = ["cdylib", "rlib"]
[dependencies]
js-sys = "0.3"
@jsjolund
jsjolund / .gitignore
Created October 16, 2022 12:07
$HOME/.gitignore
# Ignore everything
/**
# But not these files...
!.gitignore
!.vimrc
!.bashrc
!.Xresources
!.qjoypad3
@jsjolund
jsjolund / string-conversion.rs
Created September 26, 2022 21:11 — forked from jimmychu0807/string-conversion.rs
Conversion between String, str, Vec<u8>, Vec<char> in Rust
use std::str;
fn main() {
// -- FROM: vec of chars --
let src1: Vec<char> = vec!['j','{','"','i','m','m','y','"','}'];
// to String
let string1: String = src1.iter().collect::<String>();
// to str
let str1: &str = &src1.iter().collect::<String>();
// to vec of byte
@jsjolund
jsjolund / weechat_grayout.txt
Created September 26, 2022 17:05 — forked from fats/weechat_grayout.txt
[weechat] Gray out join/part/quit messages
/set irc.look.color_nicks_in_server_messages off
/set colorize_nicks.look.ignore_tags irc_join,irc_part,irc_quit
/set irc.color.message_join darkgray
/set irc.color.message_quit darkgray
/set irc.color.reason_quit darkgray
/set weechat.color.chat_tags darkgray
/set weechat.color.chat_nick darkgray
/set weechat.color.chat_host darkgray
/set weechat.color.chat_delimiters darkgray
/set weechat.color.chat_channel darkgray