Skip to content

Instantly share code, notes, and snippets.

View Poxios's full-sized avatar
🥳
Happy

YoungHyun Cho Poxios

🥳
Happy
  • Seoul, South Korea
  • Instagram 0hyun.c
View GitHub Profile
@Poxios
Poxios / extract-am-pm.js
Created August 10, 2022 10:30
자바스크립트 오전 오후 뽑아내기
export const getAMPMTimeFromDate = (date: Date) => {
let hours = date.getHours();
let minutes = date.getMinutes() as any;
let ampm = hours >= 12 ? '오후' : '오전';
hours = hours % 12;
hours = hours ? hours : 12;
minutes = minutes.toString().padStart(2, '0');
let strTime = ampm + ' ' + hours + ':' + minutes;
return strTime;
};

Download Audio from YouTube

-i - ignore errors

-c - continue

-t - use video title as file name

--extract-audio - extract audio track

@Poxios
Poxios / git-move-files-in-subfolder.md
Created May 8, 2022 08:29 — forked from ajaegers/git-move-files-in-subfolder.md
Git: move files in an subfolder keeping history

Change structure of project folder with Git

I have this structure:

 project-folder/
     .git
     wp-admin/
     wp-content/
     wp-includes/

.htaccess

@Poxios
Poxios / ffmpeg-mp4-to-animated-webp.md
Created May 28, 2021 16:09 — forked from witmin/ffmpeg-mp4-to-animated-webp.md
Convert MP4 file to animated WebP in ffmpeg

Convert MP4 file to animated WEBP file in ffmpeg CLI

1. Install ffmpeg CLI through homebrew

In terminal.app, install ffmpeg through homebrew

brew install ffmpeg

Validate the installation:

@Poxios
Poxios / discord.py
Created April 21, 2021 14:38
Generate discord emoji
string = input('')
for i in string:
if i == ' ':
print(' ', end=' ')
else:
print(":regional_indicator_" + i + ":", end=' ')
@Poxios
Poxios / bypass_distil_security_selnium.py
Created April 11, 2021 11:22 — forked from 4sushi/bypass_distil_security_selnium.py
Bypass distil security with Selenium python
"""
Example to bypass distil security (https://www.distilnetworks.com/) with Selenium.
They use the javascript field navigator.webdriver to ban Selenium
The solution is to inject javascript code before the laoding og the webpage, to set webdriver to false
Works only with chromium driver
"""
from datetime import datetime
import os
import sys