Skip to content

Instantly share code, notes, and snippets.

View danog's full-sized avatar
🇺🇦
#StandWithUkraine

Daniil Gentili danog

🇺🇦
#StandWithUkraine
View GitHub Profile
@danog
danog / dropbox_youtube_dl.sh
Last active January 13, 2018 16:00 — forked from roblight/dropbox_youtube_dl.sh
Script to download videos from YouTube using Dropbox and IFTTT automation (IFTTT recipe: https://ifttt.com/recipes/277403-download-every-youtube-video-you-add-to-your-watch-later-playlist-automatically)
#!/bin/bash
### Original script by Geoffeg, modified by Roblight and later by me (alias me='alias Danog='Daniil Gentili'')
### How to install this script:
### wget https://gist.github.com/danog/a3963463892f7f7df74a/raw/dropbox_youtube_dl.sh -O ~/dropbox_youtube_dl.sh && chmod 755 ~/dropbox_youtube_dl.sh && ~/dropbox_youtube_dl.sh --install
###
### IFTTT Recipe URL: https://ifttt.com/recipes/277403-download-every-youtube-video-you-add-to-your-watch-later-playlist-automatically
if [ "$1" = "--install" ]; then
if [ -f /usr/local/bin/youtube-dl ]; then echo "Youtube-dl already installed."; else echo "Installing youtube-dl..."; sudo curl https://yt-dl.org/downloads/2015.04.03/youtube-dl -o /usr/local/bin/youtube-dl && sudo chmod a+x /usr/local/bin/youtube-dl && echo "YouTube-dl installed successfully." || echo "Couldn't install YouTube-dl."; fi
@danog
danog / dropbox_inst.sh
Last active May 20, 2016 17:29
Dropbox headless installation script
#!/bin/bash
# Dropbox installation script by Daniil Gentili.
if [ -f ~/.dropbox-dist/dropboxd ]; then echo "Dropbox already installed."; else
echo "Installing Dropbox..."
platform=`uname -m | tr '[A-Z]' '[a-z]'`
case $platform in
"x86_64")
DROPBOXURL="http://www.dropbox.com/download?plat=lnx.x86_64"
;;
@danog
danog / dropbox_youtube_dl.sh
Last active March 13, 2022 13:22
Script to download videos from YouTube using Dropbox and IFTTT automation (IFTTT recipe: https://ifttt.com/recipes/277403-download-every-youtube-video-you-add-to-your-watch-later-playlist-automatically)
#!/bin/bash
### Original script by Geoffeg, modified by Roblight and later by me (alias me='alias Danog='Daniil Gentili'')
### How to install this script:
### wget https://gist.githubusercontent.com/danog/f86bf3113e1644b4d5d9/raw/dropbox_youtube_dl.sh -O ~/dropbox_youtube_dl.sh && chmod 755 ~/dropbox_youtube_dl.sh && ~/dropbox_youtube_dl.sh --install
###
### IFTTT Recipe URL: https://ifttt.com/recipes/277403-download-every-youtube-video-you-add-to-your-watch-later-playlist-automatically
if [ "$1" = "--install" ]; then
if [ -f /usr/local/bin/youtube-dl ]; then echo "Youtube-dl already installed."; else echo "Installing youtube-dl..."; sudo curl https://yt-dl.org/downloads/2015.04.03/youtube-dl -o /usr/local/bin/youtube-dl && sudo chmod a+x /usr/local/bin/youtube-dl && echo "YouTube-dl installed successfully." || echo "Couldn't install YouTube-dl."; fi
@danog
danog / crontab.sh
Last active August 29, 2015 14:18
Edit crontab in a script
#!/bin/bash
# Script to edit crontab by Daniil Gentili
echo "Editing crontab..."; echo "$(crontab -l)
$*" | crontab - && echo "Crontab edited successfully." || echo "Couldn't edit crontab."
@danog
danog / music.sh
Last active August 29, 2015 14:19
MP3 Player script
#!/bin/bash
# Script to play mp3 files.
# By Daniil Gentili
if [ "$1" = "--help" ]; then echo "Music player by Daniil Gentili.
Usage: `basename $0` [ Options ] file1 file2 ...
If called with no arguments you will be asked to select the file(s) to play.
Options:
@danog
danog / update.sh
Last active August 29, 2015 14:19
Update Debian/Ubuntu system
#!/bin/bash
# Debian/Ubuntu updater script
# Created by Daniil Gentili
if [ "$1" = "--help" ]; then
echo "Debian/Ubuntu upgrade script created by Daniil Gentili.
Usage: just type
update.sh
@danog
danog / sudo.sh
Created April 14, 2015 20:19
Automatic sudo request
#!/bin/bash
# Automatic sudo request
if [ $(id -u) -ne 0 ]; then
sudo $0 $* || echo "I am not sudo."
exit $?
fi
echo "I am sudo."
@danog
danog / name.sh
Last active November 12, 2017 20:29
Just the name
#!/bin/sh
echo "This script prints just the script's name without its full path.
`basename $0`
"

Keybase proof

I hereby claim:

  • I am danog on github.
  • I am danog (https://keybase.io/danog) on keybase.
  • I have a public key whose fingerprint is C0A1 F63D 5208 5C66 570C D56D 2599 0030 8520 B573

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am danog on github.
  • I am danog (https://keybase.io/danog) on keybase.
  • I have a public key ASDZoMn8FR2yTYuqQNLAYcUOdJvbgfrBwT9Lda3DloNaDQo

To claim this, I am signing this object: