Skip to content

Instantly share code, notes, and snippets.

Avatar

Brian Harrison idiomatic

  • Portland, Oregon
View GitHub Profile
View transcode.sh
(setopt null_glob;
for collection in \
"Very Fast 720p30 --subtitle=none" \
"HQ 720p30 Surround --subtitle=none" \
"Very Fast 480p30 --encoder=x265_10bit --subtitle=none" \
"HQ 1080p30 Surround --encoder=x265_10bit --subtitle=none"; do
preset=${collection%% --*} hbargs=${collection#$preset }
dest=(/Volumes/galactica/Public/Video/*/"$collection"{,/*})
src=(/Volumes/Nostromo/Rip/Blu*Rip{,/*} /Volumes/Archive*/Video/*/Blu*Rip{,/*})
[[ "$preset" != "*1080*" ]] && src=($src /Volumes/Nostromo/Rip/DVD*Rip /Volumes/Archive*/Video/*/DVD*Rip)
@idiomatic
idiomatic / README.md
Last active Dec 16, 2020
Example trivial directory-listing webservers
View README.md

Directory-listing webserver comparison.

Directory

webserver dotdot? dotfiles? extra links? href " href & text "
Apache2 inline no sort-by, in <tr><th> %22 &amp; &quot;
Caddy header yes sort-by, in <thead><tr><th> %22 &amp; &#34;
Go no yes no %22 & &#34;
Lighttpd inline no no %22 %26 &#x22;
We couldn’t find that file to show.
View .bash_profile
export HISTFILESIZE=10000
export SAVEHIST=10000
if [ -e $HOME/bin ]
then
export PATH=$PATH:$HOME/bin
fi
if which -s node
then
View RULES.md

Vanilla "Project 60" Rules

Races

Only races that were available in Vanilla.

No Pandaren [else warning].

No Worgen [else warning].

View deno http server api snippets.md

Legacy Node.js

const http = require('http');
const https = require('https');
const http2 = require('http2');
const s = http.createServer((req, res) => { });
s.listen(PORT, ADDRESS);
const options = {key: KEY, cert: CERT};
const stls = https.createServer(options, (req, res) => { });
@idiomatic
idiomatic / farmables.sql
Last active Dec 6, 2017
find things to farm in a classic WoW db, that drop "medium rarely" from few world mob types with longer average spawn durations
View farmables.sql
SELECT item.*,
CAST(oclt.ChanceOrQuestChance AS DECIMAL(6, 2)) as Chance,
COUNT(*) AS Spawns,
oct.entry as Creature,
oct.Name as `Creature Name`,
CAST(AVG(oc.SpawnTimeSecs) AS DECIMAL(6, 0)) AS `Spawn Time`
FROM (
SELECT i.*, COUNT(*) AS `Creature Types`
FROM (
SELECT iclt.item AS Item,
@idiomatic
idiomatic / islands.js
Last active Dec 6, 2017
count the number of "islands" in an matrix of non-wraparound bits, where horizontally/vertically/diagonally adjacent bits are the same island
View islands.js
const tests = [
[0, [[0]]],
[1, [[1]]],
[1, [[1, 0], [0, 0]]],
[1, [[0, 1], [0, 0]]],
[1, [[0, 0], [1, 0]]],
[1, [[0, 0], [0, 1]]],
[1, [[1, 0], [0, 1]]],
[1, [[0, 1], [0, 1]]],
[1, [[1, 0], [1, 0]]],
View methodmux.go
package main
import (
"io"
"log"
"net/http"
)
type MethodMux struct {
GET http.Handler
View react_native_index.ios.coffee
###
# Sample React Native App
# https://github.com/facebook/react-native
###
'use strict'
React = require 'react-native'
{AppRegistry, StyleSheet, Text, View} = React
CoffeeProject = React.createClass