This file contains hidden or 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
| const dateToStr = (input) => { | |
| if (input.length !== 6) { | |
| return "wrong date syntax, use YYYYMM"; | |
| } | |
| const parts = input.match(/([0-9]{4})([0-9]{2})/); | |
| if (!parts) { | |
| return "wrong date syntax, use YYYYMM"; | |
| } | |
This file contains hidden or 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
| HEVC + alpha (Safari) | |
| ffmpeg -i in.mov -c:v hevc_videotoolbox -allow_sw 1 -alpha_quality 0.75 -vtag hvc1 out.mp4 | |
| VP9 + alpha (Rest of browsers) | |
| ffmpeg -i in.mov -c:v libvpx -b:v 2000k -auto-alt-ref 0 -pix_fmt yuva420p out.webm |
This file contains hidden or 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
| // package.json | |
| { | |
| "name": "waarom", | |
| "version": "1.0.0", | |
| "description": "", | |
| "main": "webpack.config.js", | |
| "dependencies": {}, | |
| "devDependencies": { | |
| "@babel/core": "^7.16.0", |
This file contains hidden or 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
| docker exec -i mysql_container mysql -uroot -prootpassword dbname < ./dbdump.sql |
This file contains hidden or 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
| version: '3.1' | |
| services: | |
| wp: | |
| container_name: wordpress | |
| build: . | |
| ports: | |
| - 8080:80 | |
| restart: always |
This file contains hidden or 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
| FROM wordpress:php7.4-apache | |
| RUN a2enmod rewrite && a2enmod headers |
This file contains hidden or 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
| <!-- IN HEAD --> | |
| <!-- Google Tag Manager --> | |
| <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': | |
| new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], | |
| j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= | |
| 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); | |
| })(window,document,'script','dataLayer','{{ GTM_ID }}');</script> | |
| <!-- End Google Tag Manager --> | |
| <!-- IN BODY --> |
This file contains hidden or 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
| # FOR DEBUGGING PURPOSE | |
| ErrorDocument 404 "Request: %{THE_REQUEST} Referrer: %{HTTP_REFERER} Host: %{HTTP_HOST} REQUEST_URI: %{REQUEST_URI}" | |
| RewriteRule ^ - [L,R=404] |
This file contains hidden or 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
| alias ducks='du -cks * | sort -rn | head' |