ffmpeg -i ./input.mp4 -vf "fps=10,scale=320:-1:flags=lanczos" -c:v pam \
-f image2pipe - | \
convert -delay 10 - -loop 0 -layers optimize output.gif
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
# Install WSL Ubuntu | |
# Using unzip tools | |
unzip -O GB18030 your_archive.zip -d target_dir |
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
// credit: https://www.reddit.com/r/VirtualYoutubers/comments/ifzqe7/i_made_a_live_timestamp_tool/ | |
(function () { | |
if (!document.querySelector("#ytls-pane")) { | |
var pane = document.createElement("div"); | |
var exit = document.createElement("span"); | |
var list = document.createElement("ul"); | |
var nowli = document.createElement("li"); | |
var nowa = document.createElement("a"); | |
var nowid; | |
var nowtext = document.createElement("input"); |
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
import signal | |
import os | |
import hmac | |
import hashlib | |
import sys | |
def tle_handler(*args): | |
print('⏰') | |
sys.exit(0) |
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
# coding: utf-8 | |
# 自分の得意な言語で | |
# Let's チャレンジ!! | |
def min_adjacent_swap(arr): | |
swap_times = 0 | |
n = len(arr) / 2 | |
iter = 0 | |
while iter < len(arr) - 1: | |
# if current not ideal | |
if arr[iter] != iter % n: |
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
/** | |
require webp & libwebp, see https://developers.google.com/speed/webp/download | |
run: | |
cd working_dir # suppose working dir contains all webp that u want to convert | |
node ./convert.js # wait for it until done | |
*/ | |
const child = require("child_process"); | |
const fs = require("fs"); | |
const path = require("path"); | |
const util = require("util"); |
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
// https://github.com/jquense/yup/issues/394 | |
import i18next from "i18next"; | |
import { setLocale } from "yup"; | |
export const setFormikLocale = (i18n: typeof i18next): void => { | |
// Config yup validation schema default error message | |
setLocale({ | |
mixed: { | |
notType: (_ref) => { |
# check format & codec
yt-dlp -F https://www.youtube.com/watch?v=vWsmn3-7scs
# output
[info] Available formats for vWsmn3-7scs:
ID EXT RESOLUTION FPS │ FILESIZE TBR PROTO │ VCODEC VBR ACODEC ABR ASR MORE INFO
────────────────────────────────────────────────────────────────────────────────────────────────────────────
139 m4a audio only │ ~ 66.18MiB 64k dash │ audio only mp4a.40.5 64k 22k DASH audio, m4a_dash
140 m4a audio only │ ~148.90MiB 144k dash │ audio only mp4a.40.2 144k 44k DASH audio, m4a_dash
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
## create foreach storeprocedure first. If your db exist, then no need to do it. | |
CREATE proc [dbo].[sp_MSforeachtable] | |
@command1 nvarchar(2000), @replacechar nchar(1) = N'?', @command2 nvarchar(2000) = null, | |
@command3 nvarchar(2000) = null, @whereand nvarchar(2000) = null, | |
@precommand nvarchar(2000) = null, @postcommand nvarchar(2000) = null | |
AS | |
declare @mscat nvarchar(12) | |
select @mscat = ltrim(str(convert(int, 0x0002))) | |
if (@precommand is not null) | |
exec(@precommand) |
This really scare me :/
The solution is to reset macbook's NVRAM / PRAM: https://support.apple.com/en-us/HT204063
- remember press
Option
+Command
+P
+R
when the machine boot when you hear the first boot sound - holding it around 20 seconds, until you hear second boot sound
- machine will boot
- success
NewerOlder