Skip to content

Instantly share code, notes, and snippets.

#include <stdio.h>
#include <stdlib.h>
#define da_append(xs, x) \
do { \
if ((xs)->count >= (xs)->capacity) { \
if ((xs)->capacity == 0) (xs)->capacity = 256; \
else (xs)->capacity *= 2; \
(xs)->items = realloc((xs)->items, (xs)->capacity*sizeof(*(xs)->items)); \
} \
@jcchikikomori
jcchikikomori / netflixSubForYoutube.js
Last active December 26, 2024 17:07
Youtube Netflix Subtitles (modified to optimize other videos that doesn't have line breaks)
// ==UserScript==
// @name YouTube Netflix Subtitles
// @namespace http://userstyles.org
// @description The famous Netflix subtitltes with the drop shadow for YouTube.
// @author @ang3lo_azedo
// @homepage https://userstyles.org/styles/206563
// @include https://www.youtube.com/watch*
// @run-at document-start
// @version 0.20211221154624
// ==/UserScript==
@hunternsk
hunternsk / crc.c
Last active December 26, 2024 17:06
CRC-8-SAE J1850 test
// gcc crc.c -std=c99 -o crctest
#include <inttypes.h>
#include <stdio.h>
uint8_t crcTable[256];
uint8_t CalcCRC(uint8_t * buf, uint8_t len);
void CRCInit(void);
@tatumroaquin
tatumroaquin / archlinux-qemu-kvm.md
Last active December 26, 2024 17:06
QEMU-KVM Installation for Arch Linux

QEMU-KVM in Arch Linux

Check Virtualization Support

lscpu | grep -i Virtualization
  • VT-x for Intel
  • AMD-Vi for AMD

Ensure that your kernel includes KVM modules

@joao-neves95
joao-neves95 / emu8086-license-key.txt
Last active December 26, 2024 17:05
emu8086 License Key
User: ISHAAN,glaitm
Key: 27R3VDEFYFX4N0VC3FRTQZX
@grugq
grugq / gist:03167bed45e774551155
Last active December 26, 2024 17:03
operational pgp - draft

Operational PGP

This is a guide on how to email securely.

There are many guides on how to install and use PGP to encrypt email. This is not one of them. This is a guide on secure communication using email with PGP encryption. If you are not familiar with PGP, please read another guide first. If you are comfortable using PGP to encrypt and decrypt emails, this guide will raise your security to the next level.

---
title: 使用 Indirect Display 虚拟显示器,全屏 Moonlight 串流
date: 2021-10-18 19:17:32
tags: [串流, 应用, Windows, Moonlight]
---
前几天终于用上了极为先进的 Moonlight,体验到了在移动端低延迟畅玩 3A 大作(主要是躺在床上推《魔夜》),却也遇到了一些不爽的地方,比如目前移动端设备千奇百怪,常规电脑渲染的 16:9 的画面,几乎不能在 2021 年的移动设备上铺满屏幕。怎么办呢?极客湾选择把用不上的输出接口与用不上的显示器接口连接起来,调整这个不存在的显示器的大小;市面上也有很多 HDMI 诱骗器,几十甚至十几块就能解决问题;我在看过蚊子大佬的博客后,选择动手折腾一个 Indirect Display,试试在不依赖外部设备的情况下,虚拟出第二个显示器用来串流。
因为不同设备的屏幕分辨率、刷新率不尽相同,使用 Indirect Display 还得信任签名时使用的证书,因此本文不会提供编译好的版本。不过编译并不复杂,具备计算机基础知识即可。
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active December 26, 2024 17:01
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This does not works in browser for non-video, non-activity quests! For stream/play quests use the desktop app!

Note

When doing stream quests, you need at least 1 other account in the vc!

How to use this script:

  1. Accept a quest under User Settings -> Gift Inventory
@rmorey
rmorey / gen.sh
Created August 17, 2021 19:58
List of Uniform Type Identifiers
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -dump | grep uti: | cut -c 29- | sort | uniq > utis.txt