This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# This cvt command calculates the modeline for a 1920×1080 display @ 60Hz | |
modeline=`cvt 1920 1080 60 | tail -n 1 | cut -d ' ' -f 2-` | |
modeline_name=`echo ${modeline} | cut -d '"' -f 2` | |
if xrandr | grep ${modeline_name} > /dev/null; then | |
# Mode already exists (probably didn't reboot yet) so don't add it | |
echo "Monitor already configured, skipping..." | |
else | |
echo "Adding monitor config modeline from cvt output..." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<k>pinniped</k><br> | |
<b>pinniped, <abr>a.</abr> <i>and</i> <abr>n.</abr></b> | |
<i><abr>Zool.</abr></i><br> | |
<blockquote> | |
<blockquote>(<c c="darkslategray">ˈpɪnɪpɛd</c>)</blockquote> | |
</blockquote><br> | |
<blockquote> | |
<blockquote>Also <b>pinnipede</b>, <b>pinnaped</b>.</blockquote> | |
</blockquote><br> | |
<blockquote> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
abbr | title | |
---|---|---|
a. | adjective | |
a. | adoption of, adopted from | |
a | (in dates) ante | |
abbrev. | abbreviation (of) | |
Aberd. | Aberdeen | |
abl. | ablative | |
absol. | absolute(ly) | |
abstr. | abstract | |
Acad. | academia, academy, academic(al) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Based on the two-pass suggestions here: https://trac.ffmpeg.org/wiki/Encode/H.264 | |
# | |
# Optional: for multiple VOB files you wish to concatenate, do so *before* reencoding: | |
ffmpeg -i "concat:VTS_01_1.VOB|VTS_01_2.VOB|VTS_01_3.VOB" -c copy CONCAT.VOB | |
# The target average bitrate (for -b:v switch) is calculated like so: | |
# For a video that's 600 seconds long and a target filesize of 200MB | |
# (200 MiB * 8192 [converts MiB to kBit]) / 600 seconds = ~2730 kBit/s total bitrate | |
# 2730 - 128 kBit/s (desired audio bitrate) = 2602 kBit/s video bitrate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
allFilms(first: 5) { | |
edges { | |
cursor | |
node { | |
nodeId | |
filmId | |
title | |
releaseYear | |
actors: filmActorsByFilmId { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aws_set_mfa_env_vars () { | |
# This assumes you have the aws-cli tool already set up and working: | |
# http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-welcome.html | |
# | |
# This is the ARN for your MFA device, it's found in the "Security | |
# Credentials" tab of your IAM user summary | |
mfa_arn="arn:aws:iam::01234567890:mfa/your.name.here" | |
# This function only takes one parameter: the current TOTP value | |
# shown on your MFA device (will be a 6 digit number) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl --head --silent --output /dev/null \ | |
--write-out "%{http_code}: %{url_effective}\n" \ | |
https://s3.amazonaws.com/bucket/foo/bar-2.[6-82].[0-9]-[1-9].baz.[0-9].tgz \ | |
| grep -v ^403 | |
# --head # do a HEAD, not a GET; understand the tradeoffs | |
# --silent # hush the usual output progress bars etc. | |
# --output /dev/null # hush the remaining output (header echoes) | |
# --write-out "%{http_code}: %{url_effective}\n" # output these specific fields on a line, suitable for grep | |
# .../bucket/foo/bar-2.[6-82].[0-9]-[1-9].baz.[0-9].tgz # URL pattern, usual bash syntax |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(require 'url-util) | |
(defun hjst/send-to-pocket () | |
"Send the URL at point to Pocket for reading later" | |
(interactive) | |
(let | |
((url (url-get-url-at-point))) | |
(start-process-shell-command "msmtp" "*send-to-pocket*" | |
(concat "printf 'Add:\n%s\n'" | |
url | |
"| msmtp add@getpocket.com")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function format_time(date_obj) { | |
// formats a javascript Date object into a 12h AM/PM time string | |
var hour = date_obj.getHours(); | |
var minute = date_obj.getMinutes(); | |
var amPM = (hour > 11) ? "pm" : "am"; | |
if(hour > 12) { | |
hour -= 12; | |
} else if(hour == 0) { | |
hour = "12"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/hls/uk/sbr_high/llnw/bbc_radio_hereford_worcester.m3u8#BBC Hereford & Worcester | |
http://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/hls/uk/sbr_high/llnw/bbc_radio_one.m3u8#BBC Radio 1 | |
http://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/hls/uk/sbr_high/llnw/bbc_1xtra.m3u8#BBC Radio 1Xtra | |
http://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/hls/uk/sbr_high/llnw/bbc_radio_two.m3u8#BBC Radio 2 | |
http://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/hls/uk/sbr_high/llnw/bbc_radio_three.m3u8#BBC Radio 3 | |
http://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/hls/nonuk/sbr_low/llnw/bbc_radio_fourfm.m3u8#BBC Radio 4 | |
http://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/hls/nonuk/sbr_low/llnw/bbc_radio_five_live.m3u8#BBC Radio 5 Live | |
http://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/hls/uk/sbr_low/llnw/bbc_radio_five_live_sports_extra.m3u8#BBC Radio 5 Live Sports Extra | |
http://a.files.bbci. |