Skip to content

Instantly share code, notes, and snippets.

View xdom's full-sized avatar

Dominik Matta xdom

View GitHub Profile
@rhinoman
rhinoman / Hateoas.scala
Last active February 3, 2022 21:11
Getting HAL style links for HATEOAS to map correctly to JSON in Scala. Assumes you're using json4s and Jackson. I'm using the below code with Scalatra -- my servlets have the 'JacksonJsonSupport' trait mixed in
//package object full o' utility functions for creating some HAL-style HATEOAS links
package object Hateoas{
//could add an additional field specifying MIME-type, for example
case class Link(href: String, method: String)
type HateoasLinks = Map[String, Link]
//case class for a response containing a Collection of items
case class ListResponse(_links: HateoasLinks, _embedded: Map[String, List[Any]])
object HateoasLinkFactory{
//could (should) add a function for generating a "custom" action link
@sloria
sloria / bobp-python.md
Last active July 7, 2024 18:13
A "Best of the Best Practices" (BOBP) guide to developing in Python.

The Best of the Best Practices (BOBP) Guide for Python

A "Best of the Best Practices" (BOBP) guide to developing in Python.

In General

Values

  • "Build tools for others that you want to be built for you." - Kenneth Reitz
  • "Simplicity is alway better than functionality." - Pieter Hintjens
@gka
gka / plot.png
Last active April 5, 2024 03:02
visualize git logs accross multiple repositories
plot.png
@bsdlme
bsdlme / vagrant-bhyve.md
Last active May 7, 2024 12:21
Setting up vagrant-bhyve on FreeBSD

Using bhyve with vagrant

The following describes how to set up bhyve with Vagrant using the vagrant-bhyve plugin.

Prerequisites

@ricjcosme
ricjcosme / dump-restore
Created September 13, 2017 17:33
DUMP / RESTORE PostgreSQL Kubernetes
DUMP
// pod-name name of the postgres pod
// postgres-user database user that is able to access the database
// database-name name of the database
kubectl exec [pod-name] -- bash -c "pg_dump -U [postgres-user] [database-name]" > database.sql
RESTORE
// pod-name name of the postgres pod
// postgres-user database user that is able to access the database
// database-name name of the database
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@HarshadRanganathan
HarshadRanganathan / .gitconfig
Created March 20, 2019 15:27
.gitconfig aliases
[alias]
##
# One letter alias for our most frequent commands.
#
# Guidelines: these aliases do not use options, because we want
# these aliases to be easy to compose and use in many ways.
##
a = add

Ultimate Beginner's Guide to Proxmox GPU Passthrough

mirror of The Ultimate Beginner's Guide to GPU Passthrough (Proxmox, Windows 10) by /u/cjalas

>Welcome all, to the first installment of my Idiot Friendly tutorial series! I'll be guiding you through the process of configuring GPU Passthrough for your Proxmox Virtual Machine Guests. This guide is aimed at beginners to virtualization, particularly for Proxmox users. It is intended as an overall guide for passing through a GPU (or multiple GPUs) to your Virtual Machine(s). It is not intended as an all-exhaustive how-to guide; however, I will do my best to provide you with all the necessary resources and sources for the passthrough process, from start to finish. If something doesn't work properly, please check /r/Proxmox, /r/Homelab, /r/VFIO, or

@ld100
ld100 / ArchLinuxWSL2.md
Last active July 16, 2024 10:24
Steps for setting up Arch Linux on WSL2

Migrating from Ubuntu on WSL to ArchLinux on WSL2

Obsolete notice

This document was created back in 2020 and might not be actual nowadays. It is not supported anymore, so use thise information at your own risk.

Upgrading to WSL 2

  • Download WSL2 Kernel
  • run wsl --set-default-version 2 in windows command line, so that all future WSL machine will use WSL2.
@lukasmatta
lukasmatta / tutorial.md
Last active October 9, 2023 18:41
Create Windows 10 installation USB on Mac OS
  1. Download ISO from here - https://www.microsoft.com/sk-sk/software-download/windows10ISO
  2. Insert USB storage drive into your pc
  3. Identify which drive is USB mounted on by typing diskutil list command.
  4. Format USB to work with Windows diskutil eraseDisk MS-DOS "WIN10" GPT /dev/disk2 (replace /dev/disk2 with the code you got in previous command).
  5. Mount downloaded ISO hdiutil mount ~/Downloads/Win10_1903_V1_English_x64.iso
  6. Copy files to USB (excluding install.wim as it is larger than 4 GB, FAT32 allows max 4 GB files) rsync -vha --exclude=sources/install.wim /Volumes/CCCOMA_X64FRE_EN-US_DV9/ /Volumes/WIN10
  7. brew install wimlib
  8. Use wimlib to split install.wim into multiple parts wimlib-imagex split /Volumes/CCCOMA_X64FRE_EN-US_DV9/sources/install.wim /Volumes/WIN10/sources/install.swm 4000