tags: cheatsheet, csv, json, dev
Largeish data wrangling (csv, json)
- Desktop apps
- Web Apps
- CLI Tools
- CLI Snippets
| javascript:(function(){const items=document.querySelectorAll('ytd-playlist-panel-video-renderer, ytd-playlist-video-renderer');if(items.length===0){alert('No playlist videos found. Make sure the panel is visible.');return;}let pTitle='youtube_playlist';const pt1=document.querySelector('.title.ytd-playlist-panel-renderer');const pt2=document.querySelector('ytd-playlist-header-renderer yt-formatted-string, ytd-playlist-header-renderer h1');if(pt1&&pt1.textContent)pTitle=pt1.textContent.trim();else if(pt2&&pt2.textContent)pTitle=pt2.textContent.trim();else pTitle=document.title.replace(' - YouTube','');let safeName=pTitle.replace(/[\/\\?%*:|"<>]/g,%27_%27).substring(0,50)+%27.yt-plist.csv%27;let csv=%27Index,Titlu,Canal,Durata,URL\n%27;items.forEach((item,index)=>{let title=%27Fără titlu%27,channel=%27%27,time=%27%27,url=%27%27;const tEl=item.querySelector(%27#video-title');if(tEl)title=tEl.textContent.trim().replace(/"/g,'""');const cEl=item.querySelector('#byline');if(cEl)channel=cEl.textContent.trim().replace |
| # creates timelapse from a series of images | |
| ffmpeg -framerate 24 -pattern_type glob -i "folder/path/*.jpg" -c:v libx264 -pix_fmt yuv420p timelapse-3.mp4 | |
| # stitches vertically 2 videos | |
| ffmpeg -i video1.mp4 -i video2.mp4 -filter_complex "[0:v:0][1:v:0]vstack=inputs=2" -shortest -c:v libx264 output.mp4 |
| #!/bin/bash | |
| # adds 2 frames with blended opacity in between each 2 jpg images in a folder | |
| if [ "$#" -ne 1 ]; then | |
| echo "Usage: $0 <input_directory>" | |
| exit 1 | |
| fi | |
| input_dir="$1" |
| .hx-0{margin-top:1.25ex;border-bottom:1pxdotted#999;font-size:1.2em;} | |
| .hx-1{padding-left:.25ex;margin-left:.25ex;margin-top:1ex;font-size:1.1em;border-bottom:1pxdotted#DDD;} | |
| .hx-2{padding-left:.75ex;margin-left:.5ex;margin-top:.5ex;border-left:1pxsolid#EEE;} | |
| .hx-3{padding-left:1ex;margin-left:1ex;margin-top:.25ex;border-left:1pxsolid#EEE;} | |
| .hx-0+.hx-0{margin-top:.25ex;} | |
| .hx-2+.hx-2{margin-top:.5ex;} | |
| .hx-1+.hx-1{margin-top:1ex;} | |
| .hx-1:before {content: '\2022\00A0 '; color: #DCC;} | |
| .hx-2:before {content: '\00A0\203A\00A0\00A0 '; color: #DCC;} |
| #!/bin/bash | |
| # Check if an argument is provided | |
| if [ "$#" -ne 1 ]; then | |
| echo "Usage: $0 /path/to/image/directory" | |
| exit 1 | |
| fi | |
| # Define the maximum width, height, and quality | |
| MAX_WIDTH=1920 |
| #!/bin/bash | |
| # Parameters | |
| CRF_VALUE=28 # Quality level for video compression (lower is higher quality) | |
| FRAME_RATE=24 # Frame rate for video files | |
| AUDIO_BITRATE=96k # Audio bitrate for MP3 files | |
| RESIZE_PERCENT=75 # Resize percent (e.g., 75 for 75% of original size) | |
| MIN_WIDTH=2800 # Minimum width in pixels to apply resizing | |
| # Target directory (use current directory if not specified) |
tags: cheatsheet, csv, json, dev
Largeish data wrangling (csv, json)
| <html> | |
| <head> | |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | |
| <link rel="icon" type="image/png" href="/favicon.png"> | |
| <title>◉ HTML color names</title> | |
| <style> | |
| body {font: 12px Arial, Helvetica, sans-serif; } | |
| .js-color {width: 2.5em; height: 2.5em; border-radius: 50%} | |
| h4 {font-weight: normal; margin: 0} li {vertical-align: middle;} |
| <html> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>★ Emoji cheat-sheet</title> | |
| <style> | |
| html { | |
| font-family: sans-serif; | |
| -ms-text-size-adjust: 100%; | |
| -webkit-text-size-adjust: 100%; |