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 Apr 18, 2021
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 with Ubuntu 16 LTS branches and Ubuntu 17.10)

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 Apr 3, 2020 — 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 Nov 9, 2020
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)
{