Skip to content

Instantly share code, notes, and snippets.

View Ligh7bringer's full-sized avatar
🏠
Working from home

Svetlozar Georgiev Ligh7bringer

🏠
Working from home
View GitHub Profile
diff --git a/optimus_manager/xorg.py b/optimus_manager/xorg.py
index 11f573e..5460124 100644
--- a/optimus_manager/xorg.py
+++ b/optimus_manager/xorg.py
@@ -208,7 +208,10 @@ def _generate_hybrid(config, bus_ids, xorg_extra):
"\tOption \"AllowNVIDIAGPUScreens\"\n" \
"EndSection\n\n"
- text += _make_intel_device_section(config, bus_ids, xorg_extra_lines_integrated)
+ if "intel" in bus_ids:
  1. Create /etc/X11/xorg.conf.d/10-nvidia-drm-outputclass.conf:
Section "OutputClass"
    Identifier "AMD"
    MatchDriver "amdgpu"
    Driver "modesetting"
EndSection

Section "OutputClass"
" vim-bootstrap
"*****************************************************************************
"" Vim-PLug core
"*****************************************************************************
let vimplug_exists=expand('~/.config/nvim/autoload/plug.vim')
let g:vim_bootstrap_langs = "c"
let g:vim_bootstrap_editor = "nvim" " nvim or vim
@Ligh7bringer
Ligh7bringer / effective_modern_cmake.md
Created January 10, 2020 01:39 — forked from mbinna/effective_modern_cmake.md
Effective Modern CMake

Effective Modern CMake

Getting Started

For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.

After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft

configuration {
/* modi: "window,run,ssh";*/
/* width: 50;*/
/* lines: 15;*/
/* columns: 1;*/
font: "Ubuntu 14";
/* bw: 1;*/
/* location: 0;*/
/* padding: 5;*/
/* yoffset: 0;*/
@Ligh7bringer
Ligh7bringer / delete_git_submodule.md
Created July 18, 2019 22:13 — forked from myusuf3/delete_git_submodule.md
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@Ligh7bringer
Ligh7bringer / wine_gaming.sh
Created July 7, 2019 19:41 — forked from tonylambiris/wine_gaming.sh
Wine setup script for creating a minimalist gaming environment
#!/bin/bash
# run this script with environmental variables like so:
# env WINEARCH=win64 WINEPREFIX=$HOME/Documents/Wine/Overwatch ~/wine_gaming.sh
#
# the above will create a new wine prefix, removing it if it already exists
# you will be prompted to hit enter before continuing or aborting with a ctrl-c
#
# it will also download/run the latest Battle.net client but this is optional
# ensure wine-staging, winetricks, wineasio and dxvk are installed prior to running
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/home/sgeor/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
@Ligh7bringer
Ligh7bringer / pandoc.css
Created April 13, 2019 17:33 — forked from killercup/pandoc.css
Add this to your Pandoc HTML documents using `--css pandoc.css` to make them look more awesome. (Tested with Markdown and LaTeX.)
/*
* I add this to html files generated with pandoc.
*/
html {
font-size: 100%;
overflow-y: scroll;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
}
@Ligh7bringer
Ligh7bringer / GLDebugMessageCallback.c
Created December 5, 2018 02:28 — forked from liam-middlebrook/GLDebugMessageCallback.c
GL Debug Output Message Callback Guide
// This is free and unencumbered software released into the public domain.
//
// Anyone is free to copy, modify, publish, use, compile, sell, or distribute
// this software, either in source code form or as a compiled binary, for any
// purpose, commercial or non-commercial, and by any means.
//
// In jurisdictions that recognize copyright laws, the author or authors of this
// software dedicate any and all copyright interest in the software to the
// public domain. We make this dedication for the benefit of the public at large
// and to the detriment of our heirs and successors. We intend this dedication