# 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
┏━━━━━━━━━━━━━━┓ | |
┃ ┃ | |
┃ ❤️ | | |
| | | |
┗━━━━━━━━━━━━━━┛ |
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
// Load single image | |
// replace images/photo6244288433388366130.jpg with your image path | |
// You can find it on the firebase storage console | |
var imgRef = firebase.storage().ref().child('images/photo6244288433388366130.jpg'); | |
imgRef.getDownloadURL().then(function(url){ | |
var img = document.getElementById('img1'); | |
img.src = url; | |
}).catch(function(error) { |
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"); |
Cryptsetup is a utility used to conveniently set up disk encryption based
on the DMCrypt kernel module.
These include plain dm-crypt volumes, LUKS volumes, loop-AES
and TrueCrypt (including VeraCrypt extension) formats.
The project also includes a veritysetup utility used to conveniently setup
DMVerity block integrity checking kernel module
and, since version 2.0, integritysetup to setup
DMIntegrity block integrity kernel module.
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) => { |
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
matrix: | |
include: | |
# config for PHP, server side codebase | |
- language: php | |
php: | |
- 7.0 | |
# deploy jobs here | |
install: | |
- cd backend_server && composer install | |
# unit test jobs here |
NewerOlder