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
@justinbiebur
justinbiebur / Route.js
Created August 6, 2020 07:22
Routing without React-Router
const Route = ({ children, href }) => {
var navObj = useContext(NavigationContext);
var copy={...navObj};
switch(copy.pathname){
case href :
return(children);
default:
@witmin
witmin / ffmpeg-mp4-to-animated-webp.md
Last active May 29, 2024 11:34
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:

@rickiepark
rickiepark / bream_list.py
Last active January 15, 2024 12:15
도미의 길이, 무게 데이터
bream_length = [25.4, 26.3, 26.5, 29.0, 29.0, 29.7, 29.7, 30.0, 30.0, 30.7, 31.0, 31.0,
31.5, 32.0, 32.0, 32.0, 33.0, 33.0, 33.5, 33.5, 34.0, 34.0, 34.5, 35.0,
35.0, 35.0, 35.0, 36.0, 36.0, 37.0, 38.5, 38.5, 39.5, 41.0, 41.0]
bream_weight = [242.0, 290.0, 340.0, 363.0, 430.0, 450.0, 500.0, 390.0, 450.0, 500.0, 475.0, 500.0,
500.0, 340.0, 600.0, 600.0, 700.0, 700.0, 610.0, 650.0, 575.0, 685.0, 620.0, 680.0,
700.0, 725.0, 720.0, 714.0, 850.0, 1000.0, 920.0, 955.0, 925.0, 975.0, 950.0]
@rabelais88
rabelais88 / docker-swarm.md
Created November 10, 2019 05:18
스타트업에 traefik + docker-swarm을 추천하는 이유

스타트업에 traefik + docker-swarm을 추천하는 이유

  • Traefik: Reverse-proxy router
  • Docker-swarm: Docker-supported orchestrator

왜 Docker-Swarm인가?

  • kubernetes(이하 k8) 는 무겁고 느리다. docker-swarm(이하 DS)docker 최신버전에 기본으로 탑재되어 나온다. 또한 helm이나 별도의 관리 cli(kubeadm, kubectl)를 설치할 필요가 없다.

  • k8 은 세팅도 어렵다: 세팅하기가 워낙 까다로워 실제로 운영하기 적절한 경우는 devops 팀을 가진 최소 20명 이상의 대규모 사이즈 팀이다. 한 명이 작업하는 것이 아주 불가능한 것은 아니지만, 긴급수정시에는 많이 위험해질 수 있다. 총원이 10명이 되지 않는 우리팀 같은 경우는 한 사람이 급하게 기능수정을 해야될 일이 많다.

@4sushi
4sushi / bypass_distil_security_selnium.py
Created July 1, 2019 13:27
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
@shoark7
shoark7 / algorithm-sites.md
Last active April 27, 2024 16:31
개인적으로 사용했던 알고리즘 사이트들을 추천드립니다.

알고리즘이라고 많이 들어보셨을 겁니다. 알고리즘은 교과서식으로 정의해보면 '문제를 해결하는 일련의 절차'라고 할 수 있는데요. 컴퓨터로 어떤 문제를 해결해야 할 때, 코딩으로 어떻게 해결할지에 대한 구체적인 방법을 이야기합니다.

예를 들어, 숫자 배열을 정렬하는 문제가 있다고 합시다. 인간이 배열을 대충 보고 정렬하기는 쉽지만 원소의 개수가 수백만개에 달하는 배열에서 컴퓨터에게 일을 시켜서 컴퓨터가 정렬하게 하는 것은 쉽지 않습니다. 실제로 정렬은 알고리즘에서 매우 유명하고 기초적인 분야로 정렬을 하는 방법, 즉 알고리즘이 지금까지 알려진 것만 해도 수십가지가 됩니다.

알고리즘을 공부하는 것은 꽤 도움이 되는데요. 일단 코딩을 시작하시는 분들 입장에서는 코딩을 하게 되서 코딩과 문법에 익숙해지는 장점이 있고, 또 개발자적 사고를 하는 데 알고리즘 문제를 푸는 것이 도움이 됩니다. 어떤 개발 회사들은 알고리즘 능력을 테스트하기 때문에 취업을 목표로 공부하신다면 손해는 보지 않습니다.

저는 알고리즘을 좋아해서 조금씩 풀어왔는데요. 알고리즘을 풀 수 있도록 문제를 내주는 사이트들이 정말 많습니다. 오늘은 그중에서 몇 가지만 소개해드리겠습니다. 사이트는 정말 많은데요, 그중에서 제가 최소 몇 번이라도 써본 사이트들만 소개하겠습니다. 더 좋은 사이트들이 있으면 소개해주시면 추가할 수 있을 것 같습니다.


@hermanschaaf
hermanschaaf / adjust_video_speed.md
Last active April 9, 2023 01:17
Adjust Speed of a Video with ffmpeg

To increase speed of a video by a factor of 1.5x:

ffmpeg -i input.mp4 -filter_complex "[0:v]setpts=PTS/1.5[v];[0:a]atempo=1.5[a]" -map "[v]" -map "[a]" output.mp4

We can use this to adjust the speed of all the videos in a directory (Linux and macOS only):

mkdir -p output
@bityob
bityob / WSL-ssh-server.md
Last active April 23, 2024 21:08 — forked from dentechy/WSL-ssh-server.md
A step by step tutorial on how to automatically start ssh server when launching Windows Subsystem for Linux

How to automatically start ssh server when launching Windows Subsystem for Linux

Microsoft partnered with Canonical to create Bash on Ubuntu on Windows, running through a technology called the Windows Subsystem for Linux. Below are instructions on how to set up the ssh server to run automatically at boot.

  1. Uninstall and reinstall the ssh server using the following commands:
    1. sudo apt remove openssh-server
    2. sudo apt install openssh-server
  2. Edit the /etc/ssh/sshd_config file by running the command sudo vi /etc/ssh/sshd_config and do the following
    1. Change Port to 2222 (or any other port above 1000)
  3. Change UsePrivilegeSeparation to no
@umidjons
umidjons / youtube-dl-download-audio-only-on-best-quality.md
Last active March 9, 2024 07:54
Download Audio from YouTube with youtube-dl

Download Audio from YouTube

-i - ignore errors

-c - continue

-t - use video title as file name

--extract-audio - extract audio track

Aligning images

This is a guide for aligning images.

See the full Advanced Markdown doc for more tips and tricks

left alignment