- Live:
- Username: demo
- Password: demo
- Domain: local
| #!/bin/bash | |
| dir="$1" | |
| [ $# -eq 0 ] && { echo "Usage: $0 prefix"; exit 1; } | |
| if [ ! -d "$dir" ] | |
| then | |
| mkdir $dir | |
| fi |
cd Downloads
scp *.ttf pi@{hostname}.local:/home/pi/.kodi/media/fonts/ssh [email protected]
cd .kodi/media/fonts/
| #!/bin/bash | |
| a=1 | |
| for i in *.jpg; do | |
| new=$(printf "$1-%04d.jpg" "$a") #04 pad to length of 4 | |
| mv -i -- "$i" "$new" | |
| let a=a+1 | |
| done |
| #!/bin/sh | |
| for f in *.flac; do | |
| ffmpeg -i "$f" -ab 128k -map_metadata 0 -id3v2_version 3 "${f%".flac"}.mp3" | |
| done |
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.93MiBcd /usr/local/bin
sudo ln -s /System/Library/Frameworks/JavaScriptCore.framework/Versions/Current/Helpers/jsc jsc
cd ~
jsc -h
echo "print(1+2);" | jsc
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.
$ python -m SimpleHTTPServer 8000| @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" |