Skip to content

Instantly share code, notes, and snippets.

Avatar

Wayne Graham waynegraham

View GitHub Profile
@waynegraham
waynegraham / README.md
Created Dec 16, 2020
Youtube-dl on macos
View README.md

Youtube-dl is a popular commandline utility to download content from YouTube (among many other sites).

Install Youtube-dl

Open a termianl and type:

brew install youtube-dl ffmpeg
@waynegraham
waynegraham / README.md
Created Nov 3, 2020
List links in a GoogleDrive directory
View README.md
View gist:196c44e13e3afb494d113621e0c3c1b5
du -a /home | sort -n -r | head -n 5
@waynegraham
waynegraham / translate.rb
Created Jul 24, 2020
Arabic Translation vs Transliteration
View translate.rb
require 'dotenv'
require 'any_ascii'
require 'aws-sdk-translate'
Dotenv.load
class String
def is_western?
count('a-zA-Z') > 0
View Gemfile
# frozen_string_literal: true
source "https://rubygems.org"
git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
gem 'colorize'
gem 'geo_names'
gem "geocoder"
@waynegraham
waynegraham / env.sh
Created Nov 13, 2019
ZSH custom env
View env.sh
#! /bin/zsh
# Add commonly used folders to $PATH
export PATH="$PATH:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
for bindir in $HOME/local/bin $HOME/bin; do
if [ -d $bindir ]; then
PATH=$PATH:${bindir}
fi
done
@waynegraham
waynegraham / password.sh
Last active Nov 13, 2019
Password generator in zsh
View password.sh
#! /usr/bin/env zsh
if [ -z "$1" ]
then
length=18
else
length=$1
fi
openssl rand -base64 $length
@waynegraham
waynegraham / Vagrantfile
Created Aug 27, 2019
Migrate Sympa to Listserv
View Vagrantfile
# -*- 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
View gist:ca9cf74df1a9803fa93b4f351c4b696b
2018-06-26 21:43:28 INFO Zope Ready to handle requests
2018-06-26 21:43:28 WARNING OFS.Uninstalled Could not import class 'SOAPUtil' from module 'contextual.higherlogic.soaputil.SOAPUtil'
2018-06-26 21:43:28 WARNING OFS.Uninstalled Could not import class 'VocabularyLibrary' from module 'Products.ATVocabularyManager.tools.vocabularylib'
2018-06-26 21:43:28 WARNING OFS.Uninstalled Could not import class 'FormGenTool' from module 'Products.PloneFormGen.tools.formGenTool'
2018-06-26 21:43:28 WARNING OFS.Uninstalled Could not import class 'SmartlinkConfig' from module 'redturtle.smartlink.utility'
2018-06-26 21:43:28 WARNING OFS.Uninstalled Could not import class 'ISmartlinkConfig' from module 'redturtle.smartlink.interfaces.utility'
2018-06-26 21:43:28 WARNING OFS.Uninstalled Could not import class 'IDropdownSpecific' from module 'webcouturier.dropdownmenu.browser.interfaces'
2018-06-26 21:43:28 WARNING OFS.Uninstalled Could not import class 'ICollectivePortletClassLayer' from module 'collective.portletclass.inte
View api.md
{
  //Metadata about this manifest file
  "@context": "https://api.clir.org/grants/1/context.json",
  "@id": "https://www.example.edu/grants/grant##/manifest",
  "@type": "sc:Manifest",
  // Descriptive metadata about the object/work
  "label": "Recording 1",
  "metadata": [
    {"label": "Name", "value": "Object name"},