Skip to content

Instantly share code, notes, and snippets.

View privatezero's full-sized avatar

Andrew Weaver privatezero

View GitHub Profile
ffmpeg -i 'test.gif' -c:v rawvideo -pix_fmt yuv420p test.yuv
ffmpeg -f s16le -i test.yuv -f s16le -c:a pcm_s16le -af aecho test.raw
ffmpeg -f rawvideo -pix_fmt yuv420p -framerate 10 -video_size 360x240 -i ~/input.raw test.mkv
if [[ "${runtype}" = "GUI" ]] ; then
echo 'GUI'
fi
if [[ "${runtype}" = "reset" ]] ; then
_report -q -n "Reseting the configuration will clear ${config_file}. Please enter [Y] to confirm: "
read reset_response
if [[ "${reset_response}" = "[Yy]" ]] ; then
echo 'edit'
else
echo 'abort'
@privatezero
privatezero / warc.sh
Last active February 28, 2019 20:42
university homepage 2 warc
wget -r -l 2 -p -k -H --tries=2 --timeout=5 -D 'wsu.edu' "http://wsu.edu" --warc-file="$(date +%Y-%m-%d)-wsu-homepage" --warc-cdx
# Additions for CSS etc developers.google.com,access.wsu.edu,policies.wsu.edu,portal.wsu.edu,brand.wsu.edu,s3.wp.wsu.edu,s2.googleusercontent.com,repo.wsu.edu,ucomm.wsu.edu,fonts.googleapis.com,fonts.gstatic.com,googletagmanager.com,ajax.googleapis.com
@privatezero
privatezero / nokogiri.rb
Last active April 28, 2018 23:37
Nokogiri sample
require 'nokogiri'
require 'open-uri'
test = Nokogiri::XML(open("https://raw.githubusercontent.com/amiaopensource/amazingmets/master/digitized_video_mets2.xml"))
test.xpath("////Codec").each {|line| puts line.text.strip}
Source: https://vimeo.com/262276291 (First 59 Seconds)
Google Output (Video Model selected)
"Hi, I'm Kaitlyn. I am the reference archivist at the national anthropological archives in the department of anthropology at the smithsonian's national museum of natural history. I'm here at 8:00 on 2017. I was part of a pre-conference workshop and finding indigenous related collections in the Smithsonian institution national museum of American Indian national museum of natural history and the Library of Congress and we just talked a little bit about how to begin our Global Research where to find the repository were looking for and how to search online and now we're going to dig into what to do what to prepare what to expect for actually conducting our Global Research on site. Um, okay, so you found the material you're looking for, you know, where it is. Um, but it's not online and you want to see it in person. What do you do? Um, this is another time where I recommend you contact the archival staff before you visit
@privatezero
privatezero / human-created.vtt
Created June 7, 2018 22:32
Subtitles created by human transcriptionist
WEBVTT
00:00:00.000 --> 00:00:12.690
00:00:12.690 --> 00:00:22.560
Just in it's a national need
for responsible and thoughtful
00:00:22.560 --> 00:00:25.800
@privatezero
privatezero / watson-created.vtt
Created June 7, 2018 22:39
Subtitles created by parsing of Watson output
WEBVTT
00:00:12.64 --> 00:00:17.21
Justin is the national need for responsible
00:00:16.89 --> 00:00:18.8
and (PAUSE)
00:00:19.43 --> 00:00:21.2
thoughtful
require 'nokogiri'
filename = ''
doc = Nokogiri.XML(File.open(filename))
ead = doc.at_css "ead"
# Clear EAD attributes
ead.each { |att_name| }.each do |attribute_name|
ead.delete(attribute_name)
end
# Add new EAD attributes
ead['xsi:schemaLocation'] = "urn:isbn:1-931666-22-9 http://www.loc.gov/ead/ead.xsd"
cdda2wav -vall cddb=0 -t all -cuefile -paranoia paraopts=retries=200,readahead=600 -verbose-level all myfile.wav
<h1>Hirahara Test</h1>
<p><img title="George Hirahara (shown) created this darkroom underneath his barrack in the Fall of 1943. Photo by Frank Hirahara, 1945." src="https://cdm16866.contentdm.oclc.org/ui/custom/default/collection/default/images/hirahara-george-in-darkroom.jpg" alt="George Hirahara (shown) created this darkroom underneath his barrack in the Fall of 1943. Photo by Frank Hirahara, 1945." width="448" height="304" align="right" />The George and Frank C. Hirahara Collection is considered the largest private collection of photos depicting life in the Japanese American internment camp at Heart Mountain Wyoming. This collection contains over 2000 images taken and processed from January 1943 to November 1945. George Hirahara and his son Frank captured images of camp life and special family milestones such as engagement celebrations, weddings, and family portraits. Patti Hirahara, Frank’s daughter, donated this significant collection of original black and white photographs and negatives to the Washingto