Skip to content

Instantly share code, notes, and snippets.


Timur Kristóf Venemo

  • Budapest, Hungary
View GitHub Profile
Brainiarc7 /
Last active Feb 24, 2021
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:

justmoon / custom-error.js
Last active Feb 6, 2021 — forked from subfuzion/
Creating custom Error classes in Node.js
View custom-error.js
'use strict';
module.exports = function CustomError(message, extra) {
Error.captureStackTrace(this, this.constructor); =;
this.message = message;
this.extra = extra;
require('util').inherits(module.exports, Error);
mojaray2k / jsbin.burut.html
Last active Jun 30, 2019
CSS only custom-styled select Todd Parker - Filament Group Inc. How this works: This styles a native select consistently cross-platform with only minimal CSS. The native select is then styled so it is essentially invisible (no appearance, border, bg) leaving only the select's text visible. There is a wrapper around the select that has the majori…
View jsbin.burut.html
<title>Select styles with CSS only</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
body {
background-color: #fff;
font-family: helvetica, sans-serif;
margin: 4% 10%
pcdavid / setup-external-screen
Last active Sep 27, 2018
Enabling 2560x1440 under Linux (tested with Ubuntu 13.10 on an Asus Zen Prime UX31A with Intel HD 4000 and a Iiyama XB2779QS)
View setup-external-screen

Try 55 Hz if possible:

% xrandr --newmode "2560x1440_55.00" 220.812 2560 2608 2640 2720 1440 1443 1448 1478 -hsync -vsync
% xrandr --addmode HDMI1 "2560x1440_55.00"

or 30 Hz otherwise:

% xrandr --newmode "2560x1440_30.00" 146.25 2560 2680 2944 3328 1440 1443 1448 1468 -hsync +vsync
% xrandr --addmode HDMI1 "2560x1440_30.00"
DEF_UID=$(grep "^UID_MIN" /etc/login.defs | tr -s " " | cut -d " " -f2)
DEF_GID=$(grep "^GID_MIN" /etc/login.defs | tr -s " " | cut -d " " -f2)
DEVICEUSER=$(getent passwd $DEF_UID | sed 's/:.*//')
if [ "$ACTION" = "add" ]; then
if [ -b /dev/mmcblk1p1 ]; then
kraz / make.bat
Last active Mar 13, 2019
Windows batch for simulating twitter bootstrap make functionality
View make.bat
@echo off
SET BOOTSTRAP=.\docs\assets\css\bootstrap.css
SET BOOTSTRAP_LESS=.\less\bootstrap.less
SET BOOTSTRAP_RESPONSIVE=.\docs\assets\css\bootstrap-responsive.css
SET BOOTSTRAP_RESPONSIVE_LESS=.\less\responsive.less
SET HR=##################################################
::Try to use the local build tools, if installed instead of global ones
paulirish / rAF.js
Last active Feb 6, 2021
requestAnimationFrame polyfill
View rAF.js
// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel
// MIT license
(function() {
var lastTime = 0;
var vendors = ['ms', 'moz', 'webkit', 'o'];
lukemorton / README.markdown
Created Jun 4, 2011
Set caret position via jQuery
View README.markdown

jQuery Caret

This is a very simple lightweight plugin to allow you to move the caret (or cursor) position in an <input /> or <textarea> element.

By exposing three jQuery.fn methods you can easily move a a caret to any position you like:

$.fn.caretTo( index , [ offset ] )