Skip to content

Instantly share code, notes, and snippets.

View gyakovlev's full-sized avatar

Georgy Yakovlev gyakovlev

  • California, USA
View GitHub Profile
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit bash-completion-r1 flag-o-matic go-module
EGO_SUM=(
"github.com/AlecAivazis/survey/v2 v2.0.4 h1:qzXnJSzXEvmUllWqMBWpZndvT2YfoAUzAMvZUax3L2M="
"github.com/AlecAivazis/survey/v2 v2.0.4/go.mod h1:WYBhg6f0y/fNYUuesWQc0PKbJcEliGcYHB9sNT3Bg74="
"github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ="
@numinit
numinit / 0-index.md
Last active April 6, 2024 21:54
patch -p0 < fix-vega-reset.patch
@Brainiarc7
Brainiarc7 / skylake-tuning-linux.md
Last active March 30, 2024 16:01
This gist will show you how to tune your Intel-based Skylake, Kabylake and beyond Integrated Graphics Core for performance and reliability through GuC and HuC firmware usage on Linux.

Tuning Intel Skylake and beyond for optimal performance and feature level support on Linux:

Note that on Skylake, Kabylake (and the now cancelled "Broxton") SKUs, functionality such as power saving, GPU scheduling and HDMI audio have been moved onto binary-only firmware, and as such, the GuC and the HuC blobs must be loaded at run-time to access this functionality.

Enabling GuC and HuC on Skylake and above requires a few extra parameters be passed to the kernel before boot.

Instructions provided for both Fedora and Ubuntu (including Debian):

Note that the firmware for these GPUs is often packaged by your distributor, and as such, you can confirm the firmware blob's availability by running:

OpenBSD 6.0-beta (GENERIC.MP-vmm) #5: Fri Jun 3 16:44:43 CEST 2016
reyk@bsd.plumbing:/usr/src/sys/arch/amd64/compile/GENERIC.MP-vmm
real mem = 17024200704 (16235MB)
avail mem = 16503730176 (15739MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.8 @ 0xd7bfb000 (65 entries)
bios0: vendor LENOVO version "N1FET38W (1.12 )" date 03/30/2016
bios0: LENOVO 20FBCTO1WW
#!/bin/bash
# Run this script just before you put the laptop in the bin for security scanning.
# You can add the seconds the laptop will be waiting before speaking. The default
# is waiting for 180 seconds (3 minutes).
# Switch to the login screen, effectively locking the screen.
function lockscreen() {
/System/Library/CoreServices/"Menu Extras"/User.menu/Contents/Resources/CGSession -suspend
}
@qbit
qbit / ksh_osx.diff
Last active January 22, 2016 01:18
Diff to make OpenBSD's pdksh work on OSX.
diff --git a/Makefile b/Makefile
index c3a880c..c07ae39 100644
--- a/Makefile
+++ b/Makefile
@@ -17,6 +17,9 @@ OBJS+= openbsd/strlcat.o openbsd/strlcpy.o openbsd/setmode.o \
DEFS= -Wall -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 \
-DSYSTYPE=\"${OSTYPE}\"
CFLAGS+= ${DEFS} -I. -I${.CURDIR}
+.if ${OSTYPE} == "Darwin"
+LDFLAGS+= -arch x86_64
@saetia
saetia / gist:1623487
Last active March 19, 2024 15:21
Clean Install – OS X 10.11 El Capitan

OS X Preferences


most of these require logout/restart to take effect

# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false

# Set a shorter Delay until key repeat