Skip to content

Instantly share code, notes, and snippets.

View hallojs's full-sized avatar
😊
Happy

Jonas Sander hallojs

😊
Happy
View GitHub Profile
@hallojs
hallojs / create_lib_c.md
Last active January 4, 2022 18:29
Create Static vs. Shared/Dynamic Libraries in C

Static

  • *.A, *.LIB(Windows)
  • Designed to be compiled/linked into the Application
  • Larger codesize, faster

Shared/Dynamic

  • *.SO(Linux), .DYLIB (MacOS), *.DLL (Windows)
  • Designed to be loaded at runtime
  • Smaller codesize, slower
  • Run with LD_LIBRARY_PATH="PATH-TO-YOUR-LIBRARY"./EXECUTABLE
@hallojs
hallojs / configure_cuda_p70.md
Created November 2, 2021 11:37 — forked from alexlee-gk/configure_cuda_p70.md
Use integrated graphics for display and NVIDIA GPU for CUDA on Ubuntu 14.04

This was tested on a ThinkPad P70 laptop with an Intel integrated graphics and an NVIDIA GPU:

lspci | egrep 'VGA|3D'
00:02.0 VGA compatible controller: Intel Corporation Device 191b (rev 06)
01:00.0 VGA compatible controller: NVIDIA Corporation GM204GLM [Quadro M3000M] (rev a1)

A reason to use the integrated graphics for display is if installing the NVIDIA drivers causes the display to stop working properly. In my case, Ubuntu would get stuck in a login loop after installing the NVIDIA drivers. This happened regardless if I installed the drivers from the "Additional Drivers" tab in "System Settings" or the ppa:graphics-drivers/ppa in the command-line.