Youtube-dl is a popular commandline utility to download content from YouTube (among many other sites).
Open a termianl and type:
brew install youtube-dl ffmpeg
#! /bin/bash | |
for file in *.doc; do | |
textutil -convert docx "$file" | |
# Account for the new `x` in `docx` | |
pandoc -o "${file%doc}pdf" "${file}x" | |
done |
I needed to deploy a child theme to a server for folks to check out the development. I went with a git remote
to get the good stuff from git to quickly recover if (when) I break something.
On the server, I created a new directory:
$ sudo mkdir -p /var/repos/theme_name.git
require 'nokogiri' | |
require 'open-uri' | |
sitemaps = [ | |
'https://www.clir.org/page-sitemap1.xml', | |
'https://www.clir.org/page-sitemap2.xml' | |
] | |
xml = Nokogiri::XML(URI.open(sitemaps[0])) | |
# urls = xml.search('url') |
# frozen_string_literal: true | |
source "https://rubygems.org" | |
git_source(:github) {|repo_name| "https://github.com/#{repo_name}" } | |
gem "mechanize" | |
gem 'progress_bar' | |
gem 'terminal-table' |
AF,Africa,6255146 | |
AS,Asia,6255147 | |
EU,Europe,6255148 | |
NA,North America,6255149 | |
OC,Oceania,6255151 | |
SA,South America,6255150 | |
AN,Antarctica,6255152 |
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure("2") do |config| | |
config.vm.box = "ubuntu/xenial64" | |
config.vm.provision "shell", inline: <<-SHELL | |
apt-get update | |
apt-get upgrade | |
apt-get install -y python libmail-mboxparser-perl |
This is from https://webapps.stackexchange.com/questions/88769/get-share-link-of-multiple-files-in-google-drive-to-put-in-spreadsheet.
In a Google Sheet, click on Tools->Script Editor
Add the following function (be sure to change the to the ID needed):
function myFunction() {
var ss=SpreadsheetApp.getActiveSpreadsheet();
var s=ss.getActiveSheet();
du -a /home | sort -n -r | head -n 5 |