Skip to content

Instantly share code, notes, and snippets.

View Diluka's full-sized avatar
💭
I may be slow to respond.

Diluka Diluka

💭
I may be slow to respond.
  • Parsec Tech
  • Chongqing, China
  • 02:30 (UTC +08:00)
View GitHub Profile

Enable & Using vGPU Passthrough

This gist is almost entirely not unlike Derek Seaman's awesome blog:

Proxmox VE 8: Windows 11 vGPU (VT-d) Passthrough with Intel Alder Lake

As such please refer to that for pictures, here i will capture the command lines I used as i sequence the commands a little differently so it makes more logic to me.

This gists assumes you are not running ZFS and are not passing any other PCIE devices (as both of these can require addtional steps - see Derek's blog for more info)

This gist assumes you are not running proxmox in UEFI Secure boot - if you are please refer entirely to dereks blog.

@hirozed
hirozed / nvm-switch.sh
Created November 12, 2021 19:59
Auto NVM switch and install
#!/bin/bash
# place this after nvm initialization!
autoload -U add-zsh-hook
load-nvmrc() {
local node_version="$(nvm version)"
local nvmrc_path="$(nvm_find_nvmrc)"
if [ -n "$nvmrc_path" ]; then
local nvmrc_node_version=$(nvm version "$(cat "${nvmrc_path}")")
@gmolveau
gmolveau / apt-list.sh
Last active March 2, 2022 06:49
debian/ubuntu apt-get list installed top-level packages/apps only without dependencies
# source : https://unix.stackexchange.com/a/369653
# not a perfect solution but it helps
python3 -c "from apt import cache;manual = set(pkg for pkg in cache.Cache() if pkg.is_installed and not pkg.is_auto_installed);depends = set(dep_pkg.name for pkg in manual for dep in pkg.installed.get_dependencies('PreDepends', 'Depends', 'Recommends') for dep_pkg in dep);print('\n'.join(pkg.name for pkg in manual if pkg.name not in depends))"
@TheCase
TheCase / filebeats-remove_ansi_coloring.yaml
Last active June 20, 2024 14:00
Filbeats - remove ansi control characters for colored logs
- script:
when:
regexp:
message: "[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]"
lang: javascript
id: remove_ansi_color
source: >
function process(event) {
var msg = event.Get("message")
var regex = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g
@shakahl
shakahl / how-to-integrate-wsl-with-windows-10.md
Last active April 19, 2024 07:51
How to seamlessly integrate Windows Subsystem for Linux (WSL) with Windows

How to seamlessly integrate Windows Subsystem for Linux (WSL) with Windows

Installation

Install an Ubuntu version from Microsoft Store.

Please check out the Windows 10 Installation Guide written by Microsoft itself.

@mbrochh
mbrochh / some_test.js
Last active February 8, 2024 13:02
Controlling a Stripe payent popup with Cypress.io
// for this to work you need to set `"chromeWebSecurity": false` in cypress.json
describe('Make Stripe Payment', function() {
before(function() {
cy.visit('http://localhost:3000/en/stripe/checkout/')
Cypress.Cookies.preserveOnce('sessionid')
})
it('should enter credit card details and finalise payment', function() {
cy.get('[data-test="button-FormStripeCart-PayWithCreditCard"]').click()
@roylee0704
roylee0704 / dockergrep.sh
Created December 9, 2016 08:24
how to grep docker log
docker logs nginx 2>&1 | grep "127."
# ref: http://stackoverflow.com/questions/34724980/finding-a-string-in-docker-logs-of-container
@dziobas
dziobas / gist:5848891
Created June 24, 2013 09:30
Sample maven settings.xml
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at