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
<!-- REF: https://gohugo.io/templates/rss/#the-embedded-rssxml --> | |
{{- $pctx := . -}} | |
{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}} | |
{{- $pages := slice -}} | |
{{- if or $.IsHome $.IsSection -}} | |
{{- $pages = $pctx.RegularPages -}} | |
{{- else -}} | |
{{- $pages = $pctx.Pages -}} | |
{{- end -}} | |
{{- $limit := .Site.Config.Services.RSS.Limit -}} |
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
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/github-markdown-css/4.0.0/github-markdown.min.css" integrity="sha512-Oy18vBnbSJkXTndr2n6lDMO5NN31UljR8e/ICzVPrGpSud4Gkckb8yUpqhKuUNoE+o9gAb4O/rAxxw1ojyUVzg==" crossorigin="anonymous" media="print" onload="this.media='all'"/> |
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
{{ partial "disqus-thread.html" . }} |
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
<div id="disqus_thread" style="min-height: 100px;"> | |
<div id="disqus_thread_loader">กำลังโหลดความคิดเห็น ..</div> | |
</div> | |
<script type="text/javascript"> | |
var disqus_config=function(){this.page.identifier="{{ .Page.File.UniqueID }}"},disqus_observer=new IntersectionObserver(function(e){var s,t;e[0].isIntersecting&&(s=document,(t=s.createElement("script")).async=!0,t.src="//{{ .Site.DisqusShortname }}.disqus.com/embed.js",t.setAttribute("data-timestamp",+new Date),(s.head||s.body).appendChild(t),disqus_observer.disconnect())},{threshold:[0]});disqus_observer.observe(document.querySelector("#disqus_thread")); | |
</script> |
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
touch layouts/partials/disqus-thread.html |
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
#!/usr/bin/env bash | |
URL="" | |
youtube-dl --all-formats -o %(id)s-%(width)sx%(height)s-%(format_id)s.%(ext)s $URL |
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
#!/usr/bin/env bash | |
FILE_IN="video.mp4" # in | |
SCALE="640x360" # width x height | |
FILE_OUT="video_640x360.mp4" # out | |
ffmpeg -i $FILE_IN -vf scale=$SCALE $FILE_OUT |
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
#!/usr/bin/env bash | |
FILE_IN="video.mp4" # in | |
FILE_OUT="3xfaster_video.mp4" # out | |
ffmpeg -i $FILE_IN -filter:v "setpts=0.33*PTS" $FILE_OUT |
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
#!/usr/bin/env bash | |
FILE_IN="video.mp4" # in | |
FILE_OUT="trimmed_video.mp4" # out | |
ffmpeg -i $FILE_IN -ss 00:00:01.0000 -t 00:00:09.0000 -async 1 $FILE_OUT |
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
#!/usr/bin/env bash | |
FILE_IN="video.mp4" # in | |
REDUCED_VALUE=24 # integer | |
FILE_OUT="reduced_quality_video.mp4" # out | |
# reduced + no sound (with -an option) | |
ffmpeg -i $FILE_IN -vcodec libx264 -crf $REDUCED_VALUE -an $FILE_OUT | |
# only reduced |
NewerOlder