Skip to content

Instantly share code, notes, and snippets.

View TyrfingMjolnir's full-sized avatar
💭
in my scriptorium whipping up some whoopass

Tyrfing Mjølner TyrfingMjolnir

💭
in my scriptorium whipping up some whoopass
View GitHub Profile
@TyrfingMjolnir
TyrfingMjolnir / Don't use Vim.md
Created August 15, 2024 18:21 — forked from romainl/Don't use Vim.md
Don't use Vim for the wrong reasons

Don't use Vim

Don't do the crime, if you can't do the time.

-- Anthony Vincenzo "Tony" Baretta

Vim is an amazing text editor. I love it. Really, I wouldn't [organize][organize] a Vim advent calendar if I didn't. But, as amazing as it is, Vim is not for everyone. It can't solve all your problems, or be a TUI version of your favorite IDE, or make you a better programmer, or land you that dream job in the Bay Area. But Vim can help you be more mindful, focused, and efficient, as long as you approach it with the right mindset.

Don't get me wrong, I certainly welcome you to try Vim, but I'm not a proselyte. I don't thrive on newbies. I just want you to use the right tool for the job and not waste your—and anyone's—time on a fruitless quest.

@TyrfingMjolnir
TyrfingMjolnir / kvm-add-disk.json
Last active February 20, 2024 16:46 — forked from p7cq/kvm-add-disk.json
SmartOS - Add a disk to an existing VM
{
"add_disks": [
{
"media": "disk",
"model": "virtio",
"nocreate": true,
"boot": false,
"path": "/dev/zvol/rdsk/tank/purpose",
"size": 20480
}

[guide] keycloak authentication for proxmox

How to setup Proxmox to use Keycloak as authentication realm.

Proxmox Setup

root@proxmox:/etc/pve# cat domains.cfg
pam: pam
        comment Linux PAM standard authentication
@TyrfingMjolnir
TyrfingMjolnir / ResultBuilderDemo.swift
Created May 25, 2023 07:01 — forked from pitt500/ResultBuilderDemo.swift
Demo explaining Result Builders, check out this link for more context: https://youtu.be/kZ7JPFUVv1w
// Created by Pedro Rojas (aka Pitt)
// Link to learn more about this code: https://youtu.be/kZ7JPFUVv1w
import SwiftUI
import WebKit
@resultBuilder
struct HtmlBuilder {
static func buildBlock() -> [HtmlTag] {
[]
import UIKit
import PhotosUI
class ViewController: UIViewController {
@IBAction func presentPickerForImagesIncludingLivePhotos(_ sender: Any ) {
presentPicker( filter: PHPickerFilter.images )
}
private func presentPicker( filter: PHPickerFilter ) {
@TyrfingMjolnir
TyrfingMjolnir / NetworkingExample.swift
Last active November 7, 2022 12:17 — forked from vinczebalazs/NetworkingExample.swift
Protocol and generic based networking example.
import Foundation
// Model.
struct Employee: Codable {
let id: Int
let name: String
}
@TyrfingMjolnir
TyrfingMjolnir / smart-pub.md
Created January 6, 2022 01:56 — forked from onnet/smart-pub.md
SmartOS zone manipulation. Snapshot, image, rollback, and migrate.

SmartOS Zone Manipulation

Notes on snapshots, images, and migrations

Create Zone/KVM

# Create zone
vmadm create <<EOL
{
 "brand": "joyent",
 .
@TyrfingMjolnir
TyrfingMjolnir / MacOSX-smartos-xhyve.md
Last active January 6, 2022 01:59 — forked from skirmess/windows-10-pro-smartos-bhyve.md
WIP Work in Progress, not yet PoC MacOS X template for SmartOS Bhyve and MacOS X xHyve
@TyrfingMjolnir
TyrfingMjolnir / osxSetup.command
Created February 5, 2021 11:04 — forked from rettuce/osxSetup.command
osx setup command. use com.apple.dock.plist
#!/bin/sh
### Desktop & Screen Saver
# Desktopを黒に
echo "Change Desctop Pictures"
osascript -e 'tell application "Finder" to set desktop picture to POSIX file "/Library/Desktop Pictures/Solid Colors/Solid Gray Pro Ultra Dark.png"'
# ScreenSaver Kill
echo "Disable screensaver"
@TyrfingMjolnir
TyrfingMjolnir / Readme.md
Last active February 5, 2021 11:08 — forked from OlliV/disable_OS_X_NotificationCenter.txt
Disable that annoying NotificationCenter on OS X Mountain Lion

In Catalina boot into a different volume to have catalina system volume r/w