This file contains hidden or 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 <cstdint> | |
#include <cstdio> | |
#define print_size(x) printf("%20s: %2ld byte, %2ld bit\n", #x, sizeof(x), sizeof(x) * 8) | |
int main() | |
{ | |
print_size(char); | |
print_size(short); | |
print_size(int); |
This file contains hidden or 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
It seems vulkan-sdk is bundled in Ubuntu 20.04. | |
pkg-config | |
libvulkan-dev (already installed) | |
libglm-dev | |
libglfw3-dev | |
others |
This file contains hidden or 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
#!/usr/bin/env python3 | |
import stat | |
import mmap | |
import os | |
import sys | |
import hashlib | |
import urllib.parse | |
This file contains hidden or 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 | |
### multicore minterpolate in ffmpeg | |
# just slice & process & concat | |
# the concat points between sliced may be weird, but it just works | |
# default args | |
ff=/usr/bin/ffmpeg | |
fps=60000/1001 |
This file contains hidden or 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
#!/usr/bin/env python3 | |
import stat, os | |
import sys | |
import tqdm | |
import hashlib | |
import multiprocessing | |
import colorama | |
This file contains hidden or 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
#!/usr/bin/env python3 | |
import requests | |
from bs4 import BeautifulSoup | |
import urllib.parse | |
import re | |
import readline | |
import colorama | |
proxies = { |
This file contains hidden or 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
# auto deploy a fake mirror of aozora.gr.jp | |
http://aozora.local { | |
root /www/aozora | |
log /dev/shm/caddy-aozora.log | |
# install with http.git | |
git { | |
# clone official site copy | |
repo https://github.com/aozorabunko/aozorabunko.git | |
path /www/aozora |
This file contains hidden or 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
#!/usr/bin/env python3 | |
import colorama | |
import time | |
import tqdm | |
def timer(minute, color): | |
print(colorama.Style.BRIGHT + color, end='\r') | |
for i in tqdm.trange(minute * 60, bar_format='{l_bar}{bar}|{n_fmt:>4s}/{total_fmt:>4s}'): | |
time.sleep(1) |
This file contains hidden or 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
#!/usr/bin/env python3 | |
# Erase all messages by you from all servers. | |
# Consider use this script before deleting account. | |
# modified from https://github.com/elevenchars/discorddelete/blob/master/main.py | |
# This is a self-bot script. Use at your own risk. | |
# https://support.discordapp.com/hc/en-us/articles/115002192352 |
This file contains hidden or 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
Windows Registry Editor Version 5.00 | |
# CLSID_CMpegVideoCodec | |
[HKEY_CLASSES_ROOT\CLSID\{feb50740-7bef-11ce-9bd9-0000e202599c}] | |
@="MPEG Video Decoder" | |
[HKEY_CLASSES_ROOT\CLSID\{feb50740-7bef-11ce-9bd9-0000e202599c}\InprocServer32] | |
@="quartz.dll" | |
"ThreadingModel"="Both" | |
[HKEY_CLASSES_ROOT\CLSID\{083863F1-70DE-11D0-BD40-00A0C911CE86}\Instance\{feb50740-7bef-11ce-9bd9-0000e202599c}] |