Skip to content

Instantly share code, notes, and snippets.

View SunsetMkt's full-sized avatar
💭
Turnaround Time: 2 weeks

Sunset Mikoto SunsetMkt

💭
Turnaround Time: 2 weeks
View GitHub Profile
@SunsetMkt
SunsetMkt / keybase.md
Created December 20, 2024 03:21
keybase.md

Keybase proof

I hereby claim:

  • I am sunsetmkt on github.
  • I am sunsetmkt (https://keybase.io/sunsetmkt) on keybase.
  • I have a public key ASBr_SH5s2xcyPYzvdCt8TflHf8SSYePagfn5xaZbd9ycQo

To claim this, I am signing this object:

@SunsetMkt
SunsetMkt / ffmpeg-compress-mp4
Created November 15, 2024 08:48 — forked from lukehedger/ffmpeg-compress-mp4
Compress mp4 using FFMPEG
$ ffmpeg -i input.mp4 -vcodec h264 -acodec mp2 output.mp4
1. Install ffmpeg:
brew install ffmpeg --with-vpx --with-vorbis --with-libvorbis --with-vpx --with-vorbis --with-theora --with-libogg --with-libvorbis --with-gpl --with-version3 --with-nonfree --with-postproc --with-libaacplus --with-libass --with-libcelt --with-libfaac --with-libfdk-aac --with-libfreetype --with-libmp3lame --with-libopencore-amrnb --with-libopencore-amrwb --with-libopenjpeg --with-openssl --with-libopus --with-libschroedinger --with-libspeex --with-libtheora --with-libvo-aacenc --with-libvorbis --with-libvpx --with-libx264 --with-libxvid
2. Convert:
ffmpeg -i input-file.mp4 -c:v libvpx -crf 10 -b:v 1M -c:a libvorbis output-file.webm
{
"PresetList": [
{
"AlignAVStart": true,
"AudioCopyMask": [],
"AudioEncoderFallback": "av_aac",
"AudioLanguageList": [
"any"
],
"AudioList": [
@SunsetMkt
SunsetMkt / gitkeep.md
Created November 11, 2024 10:37 — forked from jlollis/gitkeep.md
.gitkeep - Push your entire folder structure to GitHub, including empty folders

.gitkeep

A .gitkeep file tells github to do the opposite of its default behaviour, which is to ignore empty folders.

If you want to track an empty folder, or a folder with untracked files, create a 0kb file with the .gitkeep file extension in that folder.

touch FOLDER_NAME/.gitkeep

@SunsetMkt
SunsetMkt / android-generate-keystores.md
Created November 6, 2024 04:47 — forked from henriquemenezes/android-generate-keystores.md
Android: Generate Release/Debug Keystores

Android: Generate Release/Debug Keystores

Generate Keystores

Debug Keystore

$ keytool -genkey -v -keystore debug.keystore -storepass android -alias androiddebugkey -keypass android -keyalg RSA -keysize 2048 -validity 10000 -dname "C=US, O=Android, CN=Android Debug"

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@SunsetMkt
SunsetMkt / worker.js
Created November 4, 2024 02:52
CSP Reports Endpoint by Cloudflare Workers
export default {
async fetch(request, env, ctx) {
const maxSize = 1 * 1024 * 1024; // 1 MB
if (request.method !== 'POST' || !request.url.endsWith('/csp-reports')) {
return new Response('Endpoint not found. Please POST to /csp-reports', {
status: 404,
headers: { 'Content-Type': 'text/plain' }
});
}
// modified from
// https://developers.cloudflare.com/workers/examples/read-post/
// https://developers.cloudflare.com/workers/examples/cors-header-proxy/
async function readRequestBody(request, url) {
const { headers, method } = request;
const contentType = headers.get("content-type") || "";
const headersObj = Object.fromEntries(headers);
@SunsetMkt
SunsetMkt / README.md
Created October 5, 2024 03:03 — forked from Luzefiru/README.md
Get Wuthering Waves Convene History URL

Wuthering Waves Convene History URL Script

Detects if you have a common installation path to extract the Wuthering Waves Convene History API URL from your local game logs. Otherwise, it will ask for you to input your own game path.

This script does not edit your files, it simply reads them and copies a substring to your clipboard for visualization purposes.

How to Use

Important

This script only works in Windows PowerShell and not in MacOS, Linux, or Android devices.