Posts

Find container with its name

Get docker container id from container name docker ps -aqf "name=containername" docker ps -aqf "name=^containername$" -q for quiet. output only the ID -a for all. works even if your container is not running -f for filter. ^ container name must start with this string $ container name must end with this string

Setup podcast blog - 자동화

Scripts Automation mini2 - record mp3 file $ crontab -l 00 11 * * * cd /Users/cychong/work/cbs-ost/script && ./record.sh >> /tmp/cron.out 2>&1 mini1 - create MD file and publish podcast $ crontab -l 04 12 * * * cd /home/cychong/work/cbs-ost/script && ./scp.sh >> /tmp/cron.out 2>&1 05 12 * * * cd /home/cychong/work/cbs-ost/script && ./publish.sh >> /tmp/cron.out 2>&1 Get mp3 file from mini2 Create md file after getting song list Rebuild site to publish the updated podcast

Disable Password for Private Github Repo

github가 제공하는 private repository를 사용하니 ID와 암호를 매번 물어보길래 찾아 보니 이렇게 해결할 수 있다고. source : How do I avoid the specification of the username and password at every git push? $ git config credential.helper store $ git push https://github.com/repo.git Username for 'https://github.com': <USERNAME> Password for 'https://USERNAME@github.com': <PASSWORD> To set the timeout for “not-asking password” git config --global credential.helper 'cache --timeout 7200'

Setup podcast blog - recording 동작 확인

듣고 싶은 mp3 파일을 mini2를 이용해서 1시간 짜리 녹음 동작확인 결과 정상 동작 확인 $ mp3info -p "%S" cinema-2020-06-18.mp3 3600 역시 mini1의 processing power 부족 때문에 제대로 1시간 녹음이 안된 듯.

Setup podcast blog - post 작성

Podcast post 작성하기 Zen theme 덕분에 mp3 파일을 포함한 blog post를 markdown 파일로 작성하고 site build만 시키면 자동적으로 podcast feed를 만들어 준다. https://github.com/frjo/hugo-theme-zen에 있는 내용을 보면 md 파일의 frontformatter에 아래 내용을 채워야 하는 듯 하다. 이 중에서 필수인 항목은 mp3 파일의 위치를 가리키는 mp3와 mp3 파일의 길이를 알려주는 duration 두 개 필요. hugo에서 image 파일 위치를 가리킬 때 static\images\a.jpg에 위치한 파일을 markdown 파일에서는 \images.a.jpg로 표현하는 것과 같은 형식을 사용하면 된다.

Setup podcast blog - Setup Hugo

Install Create Hugo for podcast cychong15:writing_factory cychong$ hugo new site cbs-ost Congratulations! Your new Hugo site is created in /Users/cychong/workspace/writing_factory/cbs-ost. Just a few more steps and you're ready to go: 1. Download a theme into the same-named folder. Choose a theme from https://themes.gohugo.io/ or create your own with the "hugo new theme <THEMENAME>" command. 2. Perhaps you want to add some content. You can add single files with "hugo new <SECTIONNAME>/<FILENAME>.

Grain of Salt

From OS X dictionary Grain of salt Pliny the Elder’s Naturalis Historia may be the origin of the phrase. To take something with a “grain of salt” or “pinch of salt” is an English language idiom that means to view something with skepticism or not to interpret something literally.[1] In the old-fashioned English units of weight, a grain weighs approximately 60 mg, which is about how much table salt a person might pick up between the fingers as a pinch.

Record CBS radio in every day

record Find out duration of mp3 file mp3info, exiftool or ffmpeg can be used to get the duration of mp3 file Though mp3info and exiftool can be used to the exiting mp3 file while the ffmpeg give the duration on recording process. $ mp3info -p "%S\n" Cinema_20200614.mp3 15 Exiftool does not give the correct duration. $ exiftool Cinema_20200614.mp3 ExifTool Version Number : 11.88 File Name : Cinema_20200614.mp3 Directory : . File Size : 235 kB File Modification Date/Time : 2020:06:14 07:16:03+09:00 File Access Date/Time : 2020:06:14 07:47:47+09:00 File Inode Change Date/Time : 2020:06:14 07:16:03+09:00 File Permissions : rw-rw-r-- File Type : MP3 File Type Extension : mp3 MIME Type : audio/mpeg MPEG Audio Version : 1 Audio Layer : 3 Audio Bitrate : 64 kbps Sample Rate : 44100 Channel Mode : Stereo MS Stereo : Off Intensity Stereo : Off Copyright Flag : False Original Media : False Emphasis : None ID3 Size : 45 Encoder Settings : Lavf58.

Hugo에 Main menu 추가하기

Hugo로 옮긴 후 아직 찾지 못한 기능 중 하나가 글 들을 종류 별로 구분해서 보는 것이었다. 각 글마다 지정한 category나 tag별로 볼 수 있는 것은 지금 사용하는 mainroad theme에서도 지원하는데 예전에 wordpress에서 많이 사용하던, post, page 등 성격 별로 다른 글들을 볼 수 있는 방법이 아쉬웠다. 하지만 hugo의 다른 theme 을 사용하는 다른 사이트에서도 유사한 기능을 사용하는 것이 보였고, 심지어 mainroad theme을 사용하는 다른 사이트에서도 같은 기능을 사용한는 것이 보였다.

Setup podcast blog - beginning

오늘 운전하는 시간이 마침 오전 11시라 CBS 신지혜의 영화음악을 들을 수 있었다. 어릴 적 부터 좋아하던 영화 음악을 괘 오래동안 듣게 해주고 있는 프로그램. 편안한 목소리와 다양한 좋은 영화 음악을 들을 수 있어 정은영의 영화음악 이후 가장 좋아하는 라디오 프로그램이 되었다. 그런데 문제는 라디오 방송 시간이 오전 11시라 회사생활을 하면서 쉽게 듣기 어려운 상황이라는 거. 2년 전에는 OS X에 cron을 이용해서 자동으로 녹음을 한 후 NAS로 파일을 옮겨서 DS Audio 앱으로 듣기도 했는데 파일 기반으로 되어 있다 보니 내가 어떤 파일을 들었는 지 알기가 어려웠다.