Skip to content

Instantly share code, notes, and snippets.

View FranLMSP's full-sized avatar
🦀

Franco FranLMSP

🦀
View GitHub Profile
@FranLMSP
FranLMSP / masRepetido.js
Last active February 1, 2019 17:14
Función para saber cual es el numero mayor de un array
const contar = function(array) {
const numeros = []
for(let i=0; i < array.length; i++) {
if(!numeros[array[i]]) {
numeros[array[i]] = 0;
}
numeros[array[i]]++
}
const mayor = numeros.reduce((a, b) => Math.max(a, b))
@FranLMSP
FranLMSP / keybase.md
Created September 16, 2019 14:41
Keybase

Keybase proof

I hereby claim:

  • I am franlmsp on github.
  • I am franlmsp (https://keybase.io/franlmsp) on keybase.
  • I have a public key ASBV95jBiB_Lv23wXp8lLF-qI9LnJXLm8JX4jRYMcbIZdQo

To claim this, I am signing this object:

@FranLMSP
FranLMSP / stuttering-nvidia-hybrid-external-monitor.md
Last active October 5, 2021 16:45
Stuttering / Tearing hybrid mode Optimus laptops (Intel + Nvidia) when using an external monitor

If you have a laptop with hybrid GPUs (Intel + Nvidia in my case) and you are using some sort of power management to switch to hybrid mode to be able to use the external HDMI monitor and you are experiencing some sort of Stuttering or weird Tearing, and you don't want to switch to Nvidia mode, this is the solution that worked for me. After a lot of research and testing, I found that disabling the modesetting driver and using the Intel driver helps with the problem. First, install the Intel driver. If you are on Arch, you install it with sudo pacman -S xf86-video-intel

Then, if you use optimus-manager, make sure to enable the Intel driver on the /etc/optimus-manager/optimus-manager.conf file like so:

[intel]
driver=intel
accel=
tearfree=yes