This file contains 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
# Python script to convert Shift-JIS encoded .srt file to UTF-8 - Powered by ChatGPT | |
# The issue you're encountering is likely due to an encoding problem. | |
# The text in your subtitle file seems to be encoded in Shift-JIS, a common encoding for Japanese text, but it is being interpreted incorrectly, probably as Latin-1 or another encoding. | |
# To fix this, you need to convert the subtitle file from Shift-JIS to UTF-8, which is the standard encoding for most modern software and supports a wide range of characters, including Japanese. | |
# Uou can use a simple Python script to convert the file from Shift-JIS to UTF-8. Here is a script that will do that for you: | |
input_file = 'input.srt' # Replace with your actual file name | |
output_file = 'output_utf8.srt' # Output file name | |
with open(input_file, 'r', encoding='shift_jis') as file: |
This file contains 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
// ==UserScript== | |
// @name HN target blank | |
// @namespace http://tampermonkey.net/ | |
// @version 0.3 | |
// @description Open Hacker News links in a new tab | |
// @author Davide Violante | |
// @match https://news.ycombinator.com/* | |
// @grant none | |
// ==/UserScript== |
This file contains 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
# Add these lines to your .bashrc file located in ~/ | |
# Show date in terminal | |
function show_date() { | |
local current_time="[$(date '+%T')]" | |
local green='\[\033[01;32m\]' | |
local blue='\[\033[01;34m\]' | |
local reset='\[\033[0m\]' | |
PS1="$current_time ${green}\u${reset}${green}@${reset}${green}\h${reset}:${blue}\w${reset}\$ " | |
} |