Skip to content

Instantly share code, notes, and snippets.

Avatar

Eadom Liu Eadom

View GitHub Profile
@darrenpmeyer
darrenpmeyer / open-vm-tools-vmware-ubuntu-sharing.md
Last active March 13, 2023 10:40
open-vm-tools and VMWare Shared Folders for Ubuntu guests
View open-vm-tools-vmware-ubuntu-sharing.md

(NB: adapted from this Ask Ubuntu thread -- tested to work on Ubuntu 16.04 LTS through Ubuntu 22.04 LTS (Jammy).

Unlike using VMWare Tools to enable Linux guest capabilities, the open-vm-tools package doesn't auto-mount shared VMWare folders. This can be frustrating in various ways, but there's an easy fix.

TL;DR

Install open-vm-tools and run:

sudo mount -t fuse.vmhgfs-fuse .host:/ /mnt/hgfs -o allow_other
@bl4ck5un
bl4ck5un / cpuid_sgx.c
Last active February 6, 2023 10:57 — forked from ayeks/cpuid_sgx.c
CPUID - Intel SGX Capabilities Detection (Extended)
View cpuid_sgx.c
/*
* This is based on ayeks's gist. I added a detailed parsing of Leaf 1 and Leaf 2 and higher.
*
* Fan Zhang
*/
#include <stdio.h>
#include <stdint.h>
#define POW2(n) (1 << n)
#define B2MB(b) (b << 20)
@ayeks
ayeks / cpuid_sgx.c
Last active November 9, 2020 15:16
CPUID - Intel SGX Capabilities Detection
View cpuid_sgx.c
/*
* For more information about the availability of SGX for your system check: https://github.com/ayeks/SGX-hardware
* Example output from a SGX enabled CPU is provided at the end of the Readme in that repo.
* This GIST won't be updated, however it will stay because it is linked in Stackoverflow.
*/
#include <stdio.h>
static inline void native_cpuid(unsigned int *eax, unsigned int *ebx,
unsigned int *ecx, unsigned int *edx)
{