分类 VPS 下的文章

批量下载youtube某人所有视频的音频部分,上下班路上手机听。
you-get只能解析视频和播放列表。youtube-dl更专业更灵活。

安装Python3, ffmpeg
pip install youtube-dl
youtube-dl --extract-audio --audio-format mp3 --playlist-start NUMBER --ignore-errors http://xxxxxxx
youtube-dl -f mp4 https://www.youtube.com/watch?v=OGyisSvjQHY

http://www.youtube-dl.org/ https://www.ffmpeg.org/

微软onedrive 5T,看起来不错,debian8 挂载

wget https://www.moerats.com/usr/shell/rclone_debian.sh && bash rclone_debian.sh;
rclone config;
mkdir /root/od; rclone mount od:/ /root/od --copy-links --no-gzip-encoding --no-check-certificate --allow-other --allow-non-empty --umask 000 &
wget https://www.moerats.com/usr/shell/rcloned && nano rcloned;
mv rcloned /etc/init.d/rcloned;chmod +x /etc/init.d/rcloned;
update-rc.d -f rcloned defaults;bash /etc/init.d/rcloned start;

如果服务启动失败,修改脚本删除sudo

nano /etc/init.d/rcloned

来自 https://www.moerats.com/archives/491/

折腾了半天,发现docker太重了,暂时不适合用

curl -fsSL get.docker.com -o get-docker.sh | bash; 
docker search centos, pull, images, 
docker run -d -it -p 8888:8888  centos
ps, start/stop/restart, docker commit -m "bt" -a "swds" 897937ede755  swds/centos:bt

在输出headers之前设置cookie

setcookie("xx", $_POST['xx'], time()+31536000); //

读取cookie

if (isset($_COOKIE["xx"])) { $xx= $_COOKIE["xx"];} else { $xx='';}