Skip to content

Instantly share code, notes, and snippets.

View l2dy's full-sized avatar

Zero King l2dy

View GitHub Profile
@l2dy
l2dy / colors.py
Created February 22, 2024 12:48 — forked from lilydjwg/colors.py
colors.py: show all kinds of terminal colors at a glance
#!/usr/bin/python3
from functools import partial
def colors16():
for bold in [0, 1]:
for i in range(30, 38):
for j in range(40, 48):
print(f'\x1b[{bold};{i};{j}m {bold};{i};{j} |\x1b[0m', end='')
print()
@l2dy
l2dy / nowplaying.js
Created December 26, 2018 15:03 — forked from xreiju/nowplaying.js
osascript -l JavaScript nowplaying.js
const iTunes = Application('iTunes')
const app = Application.currentApplication()
app.includeStandardAdditions = true
const hookURL = 'https://misskey-hook.firebaseapp.comで取得して'
function getTrack(iTunes) {
return iTunes.currentTrack()
}
function getTrackData(iTunes) {
@l2dy
l2dy / h265-ffmpeg.sh
Created April 11, 2018 15:24 — forked from k06a/install-ffmpeg-with-h265.sh
H265 with ffmpeg
brew install mp4box
brew install ffmpeg --with-fdk-aac --with-tools --with-freetype --with-libass --with-libvorbis --with-libvpx --with-x265 --HEAD
ffmpeg -i input.mov -c:v libx265 -c:a aac -preset ultrafast -an -x265-params crf=25 video.mp4
ffmpeg -i input.mov -c:a libfdk_aac -profile:a aac_he_v2 audio.aac
mp4box -add audio.aac -add video.mp4 output.mp4
ffmpeg -i output.mp4 -vcodec copy -acodec copy -tag:v hvc1 output_apple.mp4
@l2dy
l2dy / main.go
Created February 4, 2018 12:10 — forked from enricofoltran/main.go
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
package main
import (
"context"
"flag"
"fmt"
"log"
"net/http"
"os"
"os/signal"
@l2dy
l2dy / ErrCode.txt
Created December 23, 2017 06:52 — forked from c0re100/ErrCode.txt
Kirara Fantasia Error Code
ERROR = -1
SUCCESS = 0
OUTDATED = 1
APPLYING = 2
ACCESS_LIMITATION = 3
TERMS_UPDATED = 4
MAINTENANCE = 10
UNAVAILABLE = 20
OUTDATED_AB_VERSION = 30
INVALID_REQUEST_HASH = 101