Skip to content

Instantly share code, notes, and snippets.

View Rongronggg9's full-sized avatar
🧶
Vibrating

Rongrong Rongronggg9

🧶
Vibrating
View GitHub Profile
@Rongronggg9
Rongronggg9 / README.md
Last active August 24, 2022 02:21
Automatically create an EFI Boot entry for Debian efistub.

create_EFI_Boot_Entry.sh

Usage

  1. Create the script below with it's contents. (Tip: Highlight and copy with linenumbers hidden)

  2. Edit the parts to accommodate your needs.

  • See the bash, findmnt and efibootmgr manpage's of the utilities used for/in this script.
  1. Make it executable.
@Rongronggg9
Rongronggg9 / xuetangx-json-to-srt.py
Last active April 4, 2020 12:36
Convert xuetangx subtitles (json to srt)
import json, srt, datetime
def timeconvert(timestamp):
ts_str=str(timestamp)
return datetime.timedelta(seconds=int(ts_str[:-3]),milliseconds=int(ts_str[-3:]))
class Srt:
def __init__(self, decoded):
self.decoded = decoded
self.subs = [(i + 2, timeconvert(s[0]), timeconvert(s[1]), s[2])