Skip to content

Instantly share code, notes, and snippets.

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

Esaú Peralta EsauPR

🏠
Working from home
View GitHub Profile
@EsauPR
EsauPR / .json YouTube
Created October 1, 2022 04:41 — forked from LucioMSP/.json YouTube
JSON YouTube Skill
{
"interactionModel": {
"languageModel": {
"invocationName": "YouTube",
"intents": [
{
"name": "AMAZON.CancelIntent",
"samples": [
"cancela"
]
@EsauPR
EsauPR / xrandr.sh
Created April 12, 2020 01:32 — forked from debloper/xrandr.sh
Add system unrecognized but monitor supported resolution in X
#!/bin/bash
# First we need to get the modeline string for xrandr
# Luckily, the tool `gtf` will help you calculate it.
# e.g. `gtf <hRes> <vRes> <refreshRate>`:
gtf 1920 1080 60
# In this case, the horizontal resolution is 1920px the
# vertical resolution is 1080px & refresh-rate is 60Hz.
# IMPORTANT: BE SURE THE MONITOR SUPPORTS THE RESOLUTION
@EsauPR
EsauPR / InputAutoCfg.ini
Last active January 13, 2020 00:44
mupen64plus 8bitdo n30 pro 2 input config - https://mupen64plus.org/wiki/index.php?title=ControllerSetup
[8BitDo N30 Pro 2]
[8Bitdo SF30 Pro]
plugged = True
plugin = 2
mouse = False
AnalogDeadzone = 4096,4096
AnalogPeak = 32768,32768
DPad R = hat(0 Right)
DPad L = hat(0 Left)
DPad D = hat(0 Down)
@EsauPR
EsauPR / install.md
Last active March 19, 2022 21:41
Manjaro - Basic setup

Basic setup after install Manjaro

Update System

sudo pacman -Syyu

Install common applications

sudo pacman -S vim yay nomacs terminator firefox-i18n-es-mx materia-gtk-theme xclip gopass opera gdb gnuplot octave speedcrunch neofetch plasma-browser-integration korganizer kdepim-addons base-devel vlc telegram-desktop ttf-cascadia-code
@EsauPR
EsauPR / slack-icon-manjaro.md
Last active January 16, 2020 23:06
Solve slack icon in manjaro gnome

Install libappindicator

$ sudo pacman -S libappindicator-gtk3

Modify the desktop file (/usr/share/applications/slack.desktop)

Add to the exec env

/*
Porcentaje de nivel de confianza, limita la exactitud de los cálculos, toma valores del 1 al 100
*/
CONFIDENCE_LEVEL = 80
/*
Número de llamadas permitidas por usuario activo
*/
CALLS_PER_USER = 200
[Unit]
Description=Turn on the keyboard backlight
[Service]
Type=oneshot
ExecStart=/bin/kbd-backlight
[Install]
WantedBy=multi-user.target
@EsauPR
EsauPR / pow2.c
Last active November 16, 2017 05:09
#include <stdio.h>
#define MOD 10000
int my_pow(int N, int P) {
if (P == 0) return 1;
if (P == 1) return (N % MOD);
int temp_pow = my_pow(N, P/2);
if ((P % 2) == 0) {
@EsauPR
EsauPR / pow1.c
Last active November 16, 2017 05:07
#include <stdio.h>
#define MOD 10000
int main(int argc, char const *argv[]) {
int N, P, result = 1;
scanf("%d %d", &N, &P);
for (int i = 0; i < P; i++) {
result = (result * (N % MOD)) % MOD;
}
@EsauPR
EsauPR / download.js
Last active June 21, 2017 23:57
Download file from nodejs
const http = require('http');
function downloadFile(url) {
return new Promise((resolve, reject) => {
const chunks = [];
const request = http.get(url, response => {
response.on('data', chunk => {
chunks.push(chunk);
});
response.on('end', () => {