This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo off | |
cls | |
echo ============================================================ | |
echo Joycon re-pairing utility by Miigon | |
echo Useful for connecting Joycon to Bluetooth dongles that doesn't support | |
echo proper reconnect. (eg. Realtek) | |
echo See: https://www.reddit.com/r/yuzu/comments/11hssgt/ | |
echo ============================================================ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- NOTE: open this page in browser locally *without serving* (Author: miigon) --> | |
<body><div id="display" style="width: 100%; height: 75%; margin: 2px; border: solid;"> | |
<video id="video" style="width: 100%; height: 100%;" controls autoplay></video> | |
<image id="image" style="width: 100%; height: 100%; object-fit: contain;"/> | |
</div> | |
<div id="text" style="width: 100%; height: 20%; margin: 2px; padding: 10px; border: solid;"></div> | |
<script> | |
di=document.getElementById("display"); | |
vi=document.getElementById("video"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
`~/kvm` contains resourses used to set up kvm, gpu passthrough, virtio and bridged | |
networking. | |
`/etc/default/grub`: | |
added 'intel_iommu=on iommu=pt kvm.ignore_msrs=1 video=efifb:off' to GRUB_CMDLINE_LINUX_DEFAULT | |
regenerated grub config using `sudo update-grub` | |
added `softdep nouveau pre: vfio-pci` to /etc/modprobe.d/vfio.conf so that vfio | |
would load before nouveau. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// natural sort algorithm in JavaScript by Miigon. | |
// 2021-03-30 | |
// | |
// GitHub: https://github.com/miigon/ | |
function natSort(arr){ | |
return arr.map(v=>{ // split string into number/ascii substrings | |
let aux = [] | |
let str = v | |
for(let i=0;i<str.length;i++) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <unistd.h> | |
#include <sys/wait.h> | |
#include <string.h> | |
#include <stdlib.h> | |
#define prompt "\e[32mminishell\e[0m> " | |
void builtin_exit(char *argv[16]) { | |
exit(0); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# macOS power management settings optimized for longer battery life | |
# Tested on MacBook Pro 13'' Early 2015 | |
# Miigon 2020-01-28 | |
echo " " | |
echo "######################## DISCLAIMER ########################" | |
echo "Although this script can be run, it's more intended to show" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <SDL2/SDL.h> | |
#include <SDL2/SDL_image.h> | |
#include <GL/glew.h> | |
const char *vertexShaderSource = "#version 330 core\n" | |
"layout (location = 0) in vec3 aPos;\n" | |
"void main()\n" | |
"{\n" | |
" gl_Position = vec4(aPos.x, aPos.y, aPos.z, 1.0);\n" | |
"}\0"; |