Skip to content

Instantly share code, notes, and snippets.

View open-port.md

The Hardest Problem In Computer Science is Opening a Port

All I wanted was to open port 1935 so that I could run my MovieNight instance in a cluster. But I couldn’t find anywhere describing all the steps to actually open a port on Kubernetes. But #ShePersisted or whatever.

NB: a non-http port (like 1935 for RTMP, or 21 for FTP, or) can only be made accessible to one (1) service in your entire cluster. So choose wisely. Yes, this is batshit.

Configuration the Application

View emitters.js
const emitters = [
"abort",
"animationcancel",
"animationend",
"animationiteration",
"animationstart",
"auxclick",
"blur",
"canplay",
"canplaythrough",
View dork.sh
dork () {
rubyversion=$(cat "$(pwd)/.ruby-version" | tr -d '\n')
rubystring="ruby"
if [[ "$rubyversion" != "" ]]; then
rubystring="ruby:${rubyversion}"
fi
imagename=$(echo "${rubystring}" | sed 's|\:|_|')
docker run --name "${imagename}" -v "$(pwd)":/app -w /app "${rubystring}" /bin/bash -c "$1"
}
View obs-slideshow.js
const fs = require('fs')
function gifsInDir(dir) {
try {
return fs.readdirSync(dir).filter(value => {
return value.match(/\.gif$/)
})
} catch (err) {
console.dir(err)
return []
View gif.sh
#!/bin/sh
start="${1}"
duration="${2}"
input="${3}"
output="${4}"
palette="$(pwd)/palette-tmp.png"
filters="fps=15,scale=800:-1:flags=lanczos"
View gist:5dd32853d50373f3da066fa1c5bf5555
Started GET "/catalog/n6956" for 127.0.0.1 at 2018-06-21 11:03:53 -0700
Processing by CatalogController#show as HTML
Parameters: {"id"=>"n6956"}
Solr query: get select {:qt=>"search", :id=>"n6956"}
Solr fetch (37.4ms)
Search Load (0.4ms) SELECT "searches".* FROM "searches" WHERE "searches"."id" IN (15, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1) AND "searches"."id" = ? ORDER BY updated_at desc LIMIT ? [["id", 10], ["LIMIT", 1]]
Solr query: get select {"qt"=>nil, "facet.field"=>["typeDisplay"], "facet.query"=>[], "facet.pivot"=>[], "fq"=>["{!term f=typeDisplay}Faculty Member"], "hl.fl"=>[], "rows"=>2, "facet"=>false, "fl"=>"*"}
Solr fetch (14.8ms)
Rendering /Users/alex/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/blacklight-6.15.0/app/views/catalog/show.html.erb within layouts/blacklight
Rendered /Users/alex/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/blacklight-6.15.0/app/views/catalog/_previous_next_doc.html.erb (2.5ms)
@dunn
dunn / # vcmi - 2017-07-03_09-29-21.txt
Created Jul 3, 2017
vcmi (dunn/yolo/vcmi) on macOS 10.12.5 - Homebrew build logs
View # vcmi - 2017-07-03_09-29-21.txt
Homebrew build logs for dunn/yolo/vcmi on macOS 10.12.5
Build date: 2017-07-03 09:29:21
@dunn
dunn / # vcmi - 2017-07-03_06-36-52.txt
Created Jul 3, 2017
vcmi (dunn/yolo/vcmi) on macOS 10.12.5 - Homebrew build logs
View # vcmi - 2017-07-03_06-36-52.txt
Homebrew build logs for dunn/yolo/vcmi on macOS 10.12.5
Build date: 2017-07-03 06:36:52
@dunn
dunn / 01.make
Created Jun 28, 2017
building clasp on macOS 10.12.5 with Xcode 8.3.3
View 01.make
2017-06-26 13:20:06 -0700
make
allnoget
make setup
install -d /private/tmp/clasp-cl-20170626-27086-2l4llv/externals/build
install -d /private/tmp/clasp-cl-20170626-27086-2l4llv/externals/build
install -d /private/tmp/clasp-cl-20170626-27086-2l4llv/externals/build
install -d /private/tmp/clasp-cl-20170626-27086-2l4llv/externals/build/debug
View 01.make
2017-06-26 10:33:17 -0700
make
allnoget
make setup
install -d /private/tmp/clasp-cl-20170626-90824-u4akk9/externals/build
install -d /private/tmp/clasp-cl-20170626-90824-u4akk9/externals/build
install -d /private/tmp/clasp-cl-20170626-90824-u4akk9/externals/build
install -d /private/tmp/clasp-cl-20170626-90824-u4akk9/externals/build/debug