From 3b0142cedcde39e4c2097ecd916a870a3ced5ec6 Mon Sep 17 00:00:00 2001 From: Vito Graffagnino Date: Tue, 8 Sep 2020 18:10:49 +0100 Subject: Added the relevent parts of the .config directory. Alss add ssh config --- .cheat/cheat/.nmcli.swp | Bin 0 -> 12288 bytes .cheat/cheat/conda | 84 +++++++++++++++++ .cheat/cheat/i3 | 92 +++++++++++++++++++ .cheat/cheat/luna | 234 ++++++++++++++++++++++++++++++++++++++++++++++++ .cheat/cheat/nmcli | 52 +++++++++++ .cheat/cheat/sed | 17 ++++ .cheat/cheat/ssh | 53 +++++++++++ .cheat/cheat/w3mtips | 34 +++++++ .cheat/cheat/weechat | 17 ++++ .cheat/cheat/youtube-dl | 20 +++++ 10 files changed, 603 insertions(+) create mode 100644 .cheat/cheat/.nmcli.swp create mode 100644 .cheat/cheat/conda create mode 100644 .cheat/cheat/i3 create mode 100644 .cheat/cheat/luna create mode 100644 .cheat/cheat/nmcli create mode 100644 .cheat/cheat/sed create mode 100644 .cheat/cheat/ssh create mode 100644 .cheat/cheat/w3mtips create mode 100644 .cheat/cheat/weechat create mode 100644 .cheat/cheat/youtube-dl (limited to '.cheat/cheat') diff --git a/.cheat/cheat/.nmcli.swp b/.cheat/cheat/.nmcli.swp new file mode 100644 index 0000000..6365447 Binary files /dev/null and b/.cheat/cheat/.nmcli.swp differ diff --git a/.cheat/cheat/conda b/.cheat/cheat/conda new file mode 100644 index 0000000..e0df93f --- /dev/null +++ b/.cheat/cheat/conda @@ -0,0 +1,84 @@ +# Managing Conda/Anaconda +# ======================= +conda info verify conda is installed, check version # + +conda update conda Update conda package and environment manager + +conda update anaconda Update anaconda meta package + +# Managing Environments +# ===================== +conda info --envsi Get a list of environments, active + or environment shown with * +conda info -e + +conda create --name snowflakes biopython Create an environment and install + or program(s) +conda create -n snowflakes biopython + +source activate snowflakes Activate the new enviroment to use it + +conda create -n bunnies python=3.4 astroid Create new environment and specify python version + +conda create -n flowers --clone snowflakes make exact copy of environment + +conda remove -n flowers --all delete an environment + +conda env export > puppies.yml save current environment to a file + +conda env create -f puppies.yml load environment from file + +# Managing Python +# =============== +conda search --full-name python Check versions of python available to install + or +conda search -f python + +conda create -n snakes python=3.4 Install different version of Python in new environment + +# Managing Conda .condarc configuration +# ===================================== +conda config --get Get all keys and values from my .condarc file + +conda config --get channels Get value of the key channels from .condarc file + +conda config --add channels pandas Add a new value to channels so conda looks for + packages in this location. + +# Managing packages, including Python +# =================================== +conda list View list of packages and versions installed in active + environment + +conda search beautiful-soup Search for a package to see if it is available to conda install + +conda install -n bunnies beautiful-soup Install a new package + +conda update beautiful-soup Update a package in the current environment + +conda search --override-channels -c pandas bottleneck Search for a package in a specific location (the + pandas channel on Anaconda.org) + +conda install -c pandas bottleneck Install a package from a specific channel + +conda search --override-channels -c defaults beautiful-soup Search for a package to see if it is available from + the Anaconda repository + +source activate bunnies Activate the environment where you want to +pip install see install a package and install it with pip (included + with Anaconda and Miniconda) + +conda install iopro accelerate Install commercial Continuum packages + +conda skeleton pypi pyinstrument Build a Conda package from a Python Package Index +conda build pyinstrument (PyPI) Package + +# Removing packages, environments or channels +# =========================================== +conda remove --name bunnies beautiful-soup Remove one package from any named environment + +conda remove beautiful-soup Remove one package from the active environment + +conda remove --name bunnies beautiful-soup astroid Remove multiple packages from any environment + +conda remove --name snakes --all Remove an environment diff --git a/.cheat/cheat/i3 b/.cheat/cheat/i3 new file mode 100644 index 0000000..edec20a --- /dev/null +++ b/.cheat/cheat/i3 @@ -0,0 +1,92 @@ +##################################################### +# +# --- Key Bindings List --- {{{ +# +##################################################### +# +# $mod+{} +# ======= +# $mod+a focus parent +# $mod+b split h +# $mod+d exec --no-startup-id dmenu_run +# $mod+e exec --no-startup-id $term -e "mutt -F ~/.muttrc" +# $mod+f fullscreen toggle +# $mod+h focus left +# $mod+j focus down +# $mod+k focus up +# $mod+l focus right +# $mod+m exec --no-startup-id /usr/bin/mplayer +# $mod+n border normal +# $mod+r exec --no-startup-id $term -e ranger +# $mod+t layout toggle split +# $mod+u border none +# $mod+v split v +# $mod+w exec --no-startup-id $browser +# $mod+y border pixel 2 +# $mod+z split v, layout stacking +# $mod+space focus mode_toggle +# $mod+Return exec --no-startup-id +# $mod+grave exec --no-startup-id $HOME/bin/scripts/any_term_dropdown.sh +# $mod+F11 exec --no-startup-id amixer set Master 5%- +# $mod+F12 exec --no-startup-id amixer set Master 5%+ +# $mod+F1 exec --no-startup-id xbacklight -dec 5 +# $mod+F2 exec --no-startup-id xbacklight -inc 5 +# $mod+F4 mode "$mode_system" +# +# ======= +# $mod+Shift+{} +# ======= +# $mod+Shift+c reload +# $mod+Shift+d exec --no-startup-id rofi -show run -lines 10 -eh 2 -width 80 \ +# -padding $(($(xwininfo -root | awk '/Height/ {print $2}')/4)) \ +# -opacity "75" -bw 0 -bc "$base02" -bg "$base02" -fg "$base03" \ +# -hlbg "$base02" -hlfg "#9575cd" -font "System San Francisco Display 12" +# $mod+Shift+e exec --no-startup-id "i3-nagbar -t warning -m 'You pressed the exit shortcut.\ +# Do you really want to exit i3? This will end your X session.' -b \ +# 'Yes, exit i3' 'i3-msg exit'" +# $mod+Shift+f exec --no-startup-id /usr/bin/firefox -no-remote -P default +# $mod+Shift+h move left +# $mod+Shift+i exec --no-startup-id /usr/bin/firefox -no-remote -P Jupyter +# $mod+Shift+j move down +# $mod+Shift+k move up +# $mod+Shift+l move right +# $mod+Shift+m exec --no-startup-id /usr/bin/mpv +# $mod+Shift+n exec --no-startup-id /usr/bin/nm-applet +# $mod+Shift+q kill +# $mod+Shift+r restart +# $mod+Shift+t exec --no-startup-id /usr/bin/firefox -private-window -no-remote -P Torrent +# $mod+Shift+u resize shrink height 10 px or 10 ppt +# $mod+Shift+w exec --no-startup-id /usr/local/bin/eclipse/eclipse +# $mod+Shift+y exec --no-startup-id /usr/bin/firefox -no-remote -P Youtube +# $mod+Shift+space floating toggle +# $mod+Shift+Return exec --no-startup-id $term -e tmux +# +# ======= +# $mod+Ctrl+{} +# ======= +# $mod+Ctrl+r mode "resize" +# $mod+Ctrl+d gaps inner current set 0; gaps outer current set 0 +# $mod+Ctrl+t gaps inner current set 15; gaps outer current set 15 + +# $mod+Ctrl+i resize grow height 10 px or 10 ppt +# $mod+Ctrl+o resize grow width 10 px or 10 ppt +# $mod+Ctrl+u resize shrink height 10 px or 10 ppt +# $mod+Ctrl+y resize shrink width 10 px or 10ppt + +# $mod+Ctrl+h gaps inner current plus 5 +# $mod+Ctrl+j gaps outer current minus 5 +# $mod+Ctrl+k gaps outer current plus 5 +# $mod+Ctrl+l gaps inner current minus 5 +# $mod+Ctrl+space exec --no-startup-id $HOME/bin/scripts/rofi-scripts-collection/rofi-bangs.sh \ +# -font "System San Francisco Display 12" +# $mod+Ctrl+Return exec --no-startup-id guake +# +# ======= + + +##################################################### +# +# --- }}} +# +##################################################### + diff --git a/.cheat/cheat/luna b/.cheat/cheat/luna new file mode 100644 index 0000000..c19eae5 --- /dev/null +++ b/.cheat/cheat/luna @@ -0,0 +1,234 @@ +#Connect to any (known) WAP in range (or simply turn on WiFi): + +luna-send -n 1 palm://com.palm.wifi/setstate '{"state":"enabled"}' +luna-send -n 1 palm://com.palm.wifi/findnetworks '{""}' + + +#Disconnect from WiFi: + +luna-send -n 1 palm://com.palm.wifi/setstate '{"state":"disabled"}' + +#Turn Bluetooth ON: + +luna-send -n 1 palm://com.palm.btmonitor/monitor/radioon '{"visible":true, "connectable":true}' + +#Turn Bluetooth OFF: + +luna-send -n 1 palm://com.palm.btmonitor/monitor/radiooff {} + +#Using luna-send to refresh the Launcher panel. + +luna-send -n 1 palm://com.palm.applicationManager/rescan {} + + +#Get a list of all installed apps: + +luna-send -n 1 "palm://com.palm.applicationManager/listLaunchPoints" "{}" + + +#Using luna-send to launch an application: + +luna-send -n 1 palm://com.palm.applicationManager/launch {\"id\":\"com.palm.app.browser\"} +luna-send -n 1 palm://com.palm.applicationManager/launch {\"id\":\"com.palm.app.browser\",\"params\":{\"scene\":\"page\",\"target\":\"http://www.google.com\"}} + + +#Using luna-send to download a file to /media/internal/downloads/: + +luna-send -n 1 palm://com.palm.downloadmanager/download {\"target\":\"http://www.google.com/index.html\"} + + +#Using luna-send to first import and then set the wallpaper image: + +luna-send -n 1 palm://com.palm.systemservice/wallpaper/importWallpaper {"target": "/media/internal/wallpapers/your_file.jpg" } +luna-send -n 1 palm://com.palm.systemservice/setPreferences {"wallpaper": {"wallpaperName": "your_file.jpg", "wallpaperFile": "/media/internal/wallpapers/your_file.jpg"}} + + + +#Using luna-send to control the palm progress animation (The pulsing "palm" logo seen at boot): + +luna-send -n 1 palm://com.palm.systemmanager/runProgressAnimation {\"state\":\"start\"} +luna-send -n 1 palm://com.palm.systemmanager/runProgressAnimation {\"state\":\"stop\"} + +#TODO: These should probably be plugged into the Tracker app. + + +luna-send -n 1 palm://com.palm.location/setUseGps {\"useGps\":\"true\"} +luna-send -n 1 palm://com.palm.location/setAutoLocate {\"autoLocate\":\"true\"} +luna-send -n 1 palm://com.palm.location/getCurrentPosition {} + + +#List all of the processes which are running: + +sudo luna-send -n 1 palm://com.palm.applicationManager/running {} +** Message: serviceResponse Handling: 2, { "running": [ { "id": "com.palm.launcher", "processid": "1006" }, { "id": "com.palm.systemui", "processid": "1007" }, { "id": "com.palm.app.email", "processid": "1000" }, { "id": "com.palm.app.phone", "processid": "1001" }, { "id": "com.palm.app.contacts", "processid": "1002" }, { "id": "com.palm.app.camera", "processid": "1003" }, { "id": "com.palm.app.messaging", "processid": "1004" }, { "id": "com.palm.app.calendar", "processid": "1005" }, { "id": "com.palm.app.phone", "processid": "1008" }, { "id": "com.palm.app.camera", "processid": "1014" } ] } + + +#Close a process: + +luna-send -n 1 "palm://com.palm.applicationManager/close" "{\"processId\":\"1058\"}" + + +#Activate the vibrator: + +luna-send -n 1 palm://com.palm.vibrate/vibrate {\"period\":1,\"duration\":1000\} + +#The duration value is in milliseconds and can be adjusted as desired. + + +#Photos Info - list album and image from mediadb.db3: + +luna-send -n 1 luna://com.palm.mediadb/image/listalbums {} + +luna-send -n 1 luna://com.palm.mediadb/image/listimages {} + + +#Set system volume - "volume" range is 0-100 + +luna-send -n 1 palm://com.palm.audio/system/setVolume '{"volume":80}' + + +#Set media volume - "volume" range is 0-100 + +luna-send -n 1 palm://com.palm.audio/media/setVolume '{"volume":80}' + + +#Set ringtone volume - "volume" range is 0-100 + +luna-send -n 1 palm://com.palm.audio/ringtone/setVolume '{"volume":100}' + + +#Dial a number - this actually calls the number, not just setup + +luna-send -n 1 palm://com.palm.telephony/dial '{"number":"8001234567"}' + + + +#Hang up a phone call :-) There are ways to end specific types of calls but I think this is good enough for now. Let me know if you want the other methods. + +luna-send -n 1 palm://com.palm.telephony/hangupAll {} + + +#Send a text message - only need to change phone "value" and "messageText" + +luna-send -n 1 palm://com.palm.messaging/sendMessageFromCompose '{"recipientJSONArray": [{"lastName": "", "pictureLoc": "", "contactCount": 1, "displayText": "", "firstName": "", "pictureLocBig": "", "imAvailability": 6, "pictureLocSquare": "", "contactDisplay": "", "Person_id": "", "personId": "", "type": "phone", "value": "8165551234", "alreadyValidated": true, "prefix": "to$A", "identifier": ""}], "messageText": "Content of message here"}' + + +#set phone to no roam (home network only) + +luna-send -n 1 palm://com.palm.telephony//roamModeSet '{"mode":"homeonly"}' + + +#set phone to auto roam + +luna-send -n 1 palm://com.palm.telephony//roamModeSet '{"mode":"any"}' + + +#set phone to roam only + +luna-send -n 1 palm://com.palm.telephony//roamModeSet '{"mode":"roamonly"}' + + +#Applications + +#Notes (view notes): + +luna-send -n 1 palm://com.palm.notes/getNotes {} + + +#Storage + +#Enter usb storage mode: + +luna-send -n 1 palm://com.palm.storage/diskmode/enterMSM {\"user-confirmed\":true,\"enterIMasq\":false} + + +#Exit usb storage mode (toggle): + +luna-send -n 1 palm://com.palm.storage/diskmode/enterMSM {\"user-confirmed\":true,\"enterIMasq\":false} + +#Airplane Mode + +#Enable Airplane Mode: + +luna-send -n 1 palm://com.palm.systemservice/setPreferences '{"airplaneMode":true}' + + +#Disable Airplane Mode: + +luna-send -n 1 palm://com.palm.systemservice/setPreferences '{"airplaneMode":false}' + +# Fix messaging thread problem (from Grabber5.0 +# http://forums.webosnation.com/palm-pre-2/272900-sms-issue-messages-can-no-longer-displayed-conversation.html) + +"The hardest part is tracking down the person id if you have a lot of contacts. + +You have to get the id of the chat thread and the person, using Impostah. +The easiest thing to do is save the object to a file while viewing it in Impostah +(you will prob have to change the filename, as the display name for the chat thread +and person id are likely the same, and that is what is used for the default filename. +I prefixed the chat thread filename with "chatthread"). Finding the person id can take +a while if you have a lot of contacts. + +Then run this command, filling in the chat thread id and person id. +The phone# is probably not required, but I supplied it anyway, just copying the value from the chat thread." + + +#Person object and chatthread object saved from Impostah so we can grab the chatthread id +#and person id for the merge command. +# +##Update chat thread person id and locked flag. Reply address prob not necessary (it is not changing) + +luna-send -n 1 -a com.palm.app.messaging luna://com.palm.db/merge ' +{"objects":[{"_id":"XXXXXXXX","personId":"XXXXXXX","flags":{"locked":false},"replyAddress":"(999) 555-1212"}]}' + +# +#Get chatthread to confirm changes. +# + +luna-send -n 1 -a com.palm.app.messaging luna://com.palm.db/get '{"ids":["XXXXXXXX"]}' + + +# Use palm-install to install ipk +Usage: palm-install [OPTION...] [PACKAGE | APP_ID] +Install or remove applications from a HP webOS device. + +Options: +-d, --device=DEVICE Specify DEVICE to use + --device-list List the available devices +-l, --list List the installed applications +-r, --remove Remove applications instead of installing +--version Display version info and exit +--help Display this help and exit + +PACKAGE is the file path of the package to install, +e.g. ~/projects/packages/com.example.app_1.0_all.ipk. + +APP_ID is the id of the application to remove. + +DEVICE is a unique identifier which matches a device name, type, or id +(as returned by the device-list option). e.g. Use "usb" for a usb-connected +device, or "tcp" for an emulator (note: emulator must be running). If not +specified, the first device found is used. + +# Install package +palm-install ~/projects/packages/com.example.app_1.0_all.ipk + +# Remove application +palm-install -r com.example.app + +# List applications on default device +palm-install -l + +# List applications on usb device +palm-install -d usb -l + +# List applications on emulator +palm-install -d tcp -l + +# Make apps fit the whole screen Pre3 +# transfer metadata.json to the folder of each application not working correctly +# +# /media/cryptofs/apps/usr/palm/applications/(whatever app) +# +# metadata.json can be found at /MacOSX-Data1/Computing/Palm/webos/Archive/games patch/metadata.json + diff --git a/.cheat/cheat/nmcli b/.cheat/cheat/nmcli new file mode 100644 index 0000000..cd38bf4 --- /dev/null +++ b/.cheat/cheat/nmcli @@ -0,0 +1,52 @@ +# Desc: Command line interface to NetworkManager + +# Connect to a wireless access point - Parameters: +# -- the name of your wireless interface +# -- the SSID of the access point +# -- the WiFi password +nmcli d wifi connect password iface + +# Disconnect from WiFi - Parameters: +# -- the name of your wireless interface +nmcli d wifi disconnect iface + +# Get WiFi status (enabled / disabled) +nmcli radio wifi + +# Enable / Disable WiFi +nmcli radio wifi + +# Show all available WiFi access points +nmcli dev wifi list + +# Refresh the available WiFi connection list +nmcli dev wifi rescan + +# Show all available connections +nmcli con + +# Show only active connections +nmcli con show --active + +# Review the available devices +nmcli dev status + +# Add a dynamic ethernet connection - parameters: +# -- the name of the connection +# -- the name of the interface +ncmli con add type ethernet con-name ifname + +# Bring up the ethernet connection +nmcli con up + +# Bring Wifi radio up, connect to SSID, switch on vpn +nmcli radio wifi on +nmcli con up +vpn__up + + +# Switch off vpn, disconnect from SSID, bring Wifi radio down +vpn__dn +nmcli con down +nmcli radio wifi off + diff --git a/.cheat/cheat/sed b/.cheat/cheat/sed new file mode 100644 index 0000000..e22c97a --- /dev/null +++ b/.cheat/cheat/sed @@ -0,0 +1,17 @@ +# To replace all occurrences of "day" with "night" and write to stdout: +sed 's/day/night/g' file.txt + +# To replace all occurrences of "day" with "night" within file.txt: +sed -i 's/day/night/g' file.txt + +# To replace all occurrences of "day" with "night" on stdin: +echo 'It is daytime' | sed 's/day/night/g' + +# To remove leading spaces +sed -i -r 's/^\s+//g' file.txt + +# To remove empty lines and print results to stdout: +sed '/^$/d' file.txt + +# To replace newlines in multiple lines +sed ':a;N;$!ba;s/\n//g' file.txt diff --git a/.cheat/cheat/ssh b/.cheat/cheat/ssh new file mode 100644 index 0000000..e4087a9 --- /dev/null +++ b/.cheat/cheat/ssh @@ -0,0 +1,53 @@ +# To ssh via pem file (which normally needs 0600 permissions): +ssh -i /path/to/file.pem user@example.com + +# To connect on an non-standard port: +ssh -p 2222 user@example.com + +# To connect and forward the authentication agent +ssh -A user@example.com + +# To execute a command on a remote server: +ssh -t user@example.com 'the-remote-command' + +# To tunnel an x session over SSH: +ssh -X user@example.com + +# Redirect traffic with a tunnel between local host (port 8080) and a remote +# host (remote.example.com:5000) through a proxy (personal.server.com): +ssh -f -L 8080:remote.example.com:5000 user@personal.server.com -N + +# To launch a specific x application over SSH: +ssh -X -t user@example.com 'chromium-browser' + +# To create a SOCKS proxy on localhost and port 9999 +ssh -D 9999 user@example.com + +# -X use an xsession, -C compress data, "-c blowfish" use the encryption blowfish +ssh user@example.com -C -c blowfish -X + +# For more information, see: +# http://unix.stackexchange.com/q/12755/44856 + +# Copy files and folders through ssh from remote host to pwd with tar.gz compression +# when there is no rsync command available +ssh user@example.com "cd /var/www/Shared/; tar zcf - asset1 asset2" | tar zxf - + +# Set up SSH Passwordless login using ssh keygen +# +# 1. On client, generate public/private keys + +ssh-keygen -t rsa + +# 2. Login to server and make sure that a .ssh directory exists in user's home directory. Create it otherwise. +# +# 3. Use ssh from client to upload the public key to the server, and place it in the users's .ssh directory and call it authorized_keys + +[user@client]$ cat .ssh/id_rsa.pub | ssh user@server 'cat >> .ssh/authorized_keys' + +# 4. Set Permissions on server + +[user@client]$ ssh user@server 'chmod 700 .ssh; chmod 640 .ssh/authorized_keys' + +# 5. Can now login to server with the use of password. + diff --git a/.cheat/cheat/w3mtips b/.cheat/cheat/w3mtips new file mode 100644 index 0000000..eb1b027 --- /dev/null +++ b/.cheat/cheat/w3mtips @@ -0,0 +1,34 @@ +# The list of external browsers assigned to w3m are as follows: +# +#extbrowser /home/opensuse/vgg/anaconda3/bin/qutebrowser +#extbrowser2 bash -c 'transmission-remote -a "$0" && notify-send -t 3000 -i emblem-downloads "Adding Torrent" "$0" ' +#extbrowser3 bash -c 'echo -n "$0" | xclip -selection clipboard && notify-send -t 3000 -i edit-copy "W3M URL Yank To Clipboard" "$0"' +#extbrowser4 bash -c 'TS_SOCKET=/tmp/ytdl ts /home/opensuse/vgg/anaconda3/bin/youtube-dl "$0" && notify-send -t 3000 -i package-x-generic "youtube-dl: Downloading" "$0" ' +#extbrowser5 bash -c 'TS_SOCKET=/tmp/w3m ts /usr/bin/aria2c -j 1 -c -d $HOME/Downloads "$0" && notify-send -t 3000 -i package-x-generic "Aria2c: Downloading" "$0" ' +#extbrowser6 bash -c 'TS_SOCKET=/tmp/mpv ts /usr/bin/mpv --ontop --force-window --autofit=500x200 --geometry=-15-50 "$0" && notify-send -t 3000 -i video-x-generic "MPV Queue" "$0"' +#extbrowser7 /usr/bin/firefox +# +# To browse current document using external browsers, use the following Key bindings: + +# For external browser (i.e. qutebrowser see above list) +M + +# to send torrent link to transmission-remote +2M + +# to copy hyperlink to clipboard +3M + +# to download link via youtube-dl +4M + +# to download link via aria +5M + +# to send link to mpv +6M + +# or via firefox +7M + +To browse the link using external browsers, prefix the above key bindings with the ESC key. diff --git a/.cheat/cheat/weechat b/.cheat/cheat/weechat new file mode 100644 index 0000000..869ca07 --- /dev/null +++ b/.cheat/cheat/weechat @@ -0,0 +1,17 @@ +# Set unread marker on all windows +Ctrl-s Ctrl-u + +# Switch buffer left +Ctrl-p, Alt-left +# Switch buffer right +Ctrl-n, Alt-right +# Next buffer with activity +Alt-a +# Switch buffers +#Alt-0...9 +Ctrl-x + +# Scroll buffer title +F9/F10 +# Scroll nick list +F11/F12 diff --git a/.cheat/cheat/youtube-dl b/.cheat/cheat/youtube-dl new file mode 100644 index 0000000..2ff3536 --- /dev/null +++ b/.cheat/cheat/youtube-dl @@ -0,0 +1,20 @@ +# To download a video in 720p MP4: +youtube-dl -f 22 example.com/watch?v=id + +# To download a video in 720p MP4 or WebM or FLV: +youtube-dl -f 22/45/120 + +# To list all available formats of a video: +youtube-dl -F example.com/watch?v=id + +# To download a video to /$uploader/$date/$title.$ext: +youtube-dl -o '%(uploader)s/%(date)s/%(title)s.%(ext)s' example.com/watch?v=id + +# To download a video playlist starting from a certain video: +youtube-dl --playlist-start 5 example.com/watch?v=id&list=listid + +# To simulate a download with youtube-dl: +youtube-dl -s example.com/watch?v=id + +# For all video formats see +# http://en.wikipedia.org/wiki/YouTube#Quality_and_codecs -- cgit v1.2.3