Skip to content

Instantly share code, notes, and snippets.

View xivid's full-sized avatar

Zhifei Yang xivid

View GitHub Profile
@xivid
xivid / sev-snp.log
Last active May 31, 2023 17:06
SEV-SNP QEMU log
/home/zhifei/sev/rebuild/snp-release-2023-05-26/usr/local/bin/qemu-system-x86_64 -enable-kvm -cpu EPYC-v4 -machine q35 -smp 1,maxcpus=64 -m 8192M,slots=5,maxmem=30G -no-reboot -drive if=pflash,format=raw,unit=0,file=/home/zhifei/sev/rebuild/snp-release-2023-05-26/usr/local/share/qemu/OVMF_CODE.fd,readonly -drive if=pflash,format=raw,unit=1,file=/home/zhifei/sev/rebuild/snp-release-2023-05-26/ubuntu.fd -netdev user,id=vmnic,hostfwd=tcp::8008-:22 -device e1000,netdev=vmnic,romfile= -drive file=/home/zhifei/sev/rebuild/snp-release-2023-05-26/ubuntu.qcow2,if=none,id=disk0,format=qcow2 -device virtio-scsi-pci,id=scsi0,disable-legacy=on,iommu_platform=true -device scsi-hd,drive=disk0 -machine memory-encryption=sev0,vmport=off -object memory-backend-memfd-private,id=ram1,size=8192M,share=true -object sev-snp-guest,id=sev0,cbitpos=51,reduced-phys-bits=1,discard=none -machine memory-backend=ram1,kvm-type=protected -nographic -monitor pty -monitor unix:monitor,server,nowait -vnc :0
qemu-system-x86_64: -drive if=pflash
@xivid
xivid / values.yaml
Created March 1, 2021 15:23
OpenFaaS testbench deployment values
functionNamespace: openfaastb-fn # Default namespace for functions
# See https://www.openfaas.com/support for more
openfaasPRO: false
exposeServices: true
async: true
serviceType: NodePort
@xivid
xivid / theme.xml
Created August 9, 2019 13:37
A Minimalist Blogger Theme
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html>
<html expr:dir='data:blog.languageDirection' xmlns='http://www.w3.org/1999/xhtml' xmlns:b='http://www.google.com/2005/gml/b' xmlns:data='http://www.google.com/2005/gml/data' xmlns:expr='http://www.google.com/2005/gml/expr'>
<head>
<meta charset='UTF-8'/>
<meta content='width=device-width' name='viewport'/>
<b:include data='blog' name='all-head-content'/>
<link href='//fonts.googleapis.com/css?family=Merriweather%3A300%2C400%2C700' media='all' rel='stylesheet' type='text/css'/>
<link href='//netdna.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css' rel='stylesheet'/>
@xivid
xivid / emoha.c
Created June 14, 2018 22:16
emoha
#include <stdio.h>
#include "emoha.h"
😃 😆
😃 😄 👉 🐶 🙏 😂 👉 🐷 🙈
📝 🙈
😴
@xivid
xivid / tensorflow_1_6_high_sierra_gpu.md
Last active May 5, 2018 16:28 — forked from mattiasarro/tensorflow_1_6_high_sierra_gpu.md
Install Tensorflow 1.6 on macOS High Sierra 10.13.3 with GPU Acceleration (without disabling SIP)

Tensorflow 1.6 on macOS High Sierra 10.13.3 with GPU Acceleration (without disabling SIP)

This gist (based on a blog post at byai.io) documents how to set up TensorFlow 1.6 with (e)GPU support without the need to disable SIP. Following the original gist got me a saystem in which training TF on eGPU was successful, but there were various visual glitches due to the newer / less stable version of the driver.

As pointed out by ronchigram, many people are having issues with newer NVIDIA drivers, so it's worth using the nvidia-update script by Benjamin Dobell that installs the latest stable NVIDIA web driver, and if necessary patches it to run on your system. We also don't need to disable SIP when using nvidia-update.

I have als

@xivid
xivid / greetings.py
Created April 15, 2018 19:14
first gist
print('hello world')