Skip to content

Instantly share code, notes, and snippets.

@psiborg
psiborg / formats.md
Last active September 20, 2021 18:32
youtube-dl
youtube-dl -F https://www.youtube.com/watch\?v\={ID}
[youtube] {ID}: Downloading webpage
[info] Available formats for {ID}:
format code  extension  resolution note
249          webm       audio only tiny   50k , webm_dash container, opus @ 50k (48000Hz), 15.30MiB
250          webm       audio only tiny   56k , webm_dash container, opus @ 56k (48000Hz), 16.93MiB
@psiborg
psiborg / jsc.md
Last active August 27, 2021 20:59
JavaScriptCore - JavaScript runtime in the macOS terminal
@psiborg
psiborg / web-servers.md
Created May 20, 2021 03:14 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@psiborg
psiborg / pop_os.md
Last active May 13, 2021 03:22
Pop!_OS

Pop OS

sudo apt install htop

sudo apt install ffmpeg

sudo apt install vlc
@psiborg
psiborg / import.bat
Last active January 25, 2021 19:21
Import Shapefiles to SQL Server
@echo off
set osgeopath="C:\OSGeo4W64\bin"
set basepath="C:\Users\{username}\Downloads\Esri"
rem echo %osgeopath%
rem echo %basepath%
cd "%basepath%\GIS_Data_&_Maps_CD1[World_Europe]\europe\basemap"
for %%f IN (*.shp) DO %osgeopath%\ogr2ogr.exe -overwrite -f MSSQLSpatial "MSSQL: Driver={SQL Server Native Client 11.0}; Server=localhost; Database=esri_europe_basemap; Trusted_Connection=yes" "%%f"
@psiborg
psiborg / ffmpeg.md
Last active December 17, 2022 14:51
FFmpeg
@psiborg
psiborg / ffmpeg.md
Created October 20, 2020 02:04 — forked from protrolium/ffmpeg.md
ffmpeg guide

ffmpeg

Converting Audio into Different Formats / Sample Rates

Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma

You can get the list of supported formats with:
ffmpeg -formats

Convert WAV to MP3, mix down to mono (use 1 audio channel), set bit rate to 64 kbps and sample rate to 22050 Hz:

@psiborg
psiborg / Soundflower.md
Created July 7, 2020 20:20
Sunflower - MacOS system extension that allows applications to pass audio to other applications.
@psiborg
psiborg / git.md
Created June 19, 2020 00:01
Copy a Git repo to another repo