Skip to content

Instantly share code, notes, and snippets.

View dougal's full-sized avatar

Douglas F Shearer dougal

View GitHub Profile
# Function to set the current AWS Profile.
#
# Checks to see if the profile exists before setting it.
set AWS_PROFILES_PATH $HOME/.aws/credentials
function awsprofile
set target_profile $argv
if test -z $target_profile
# Download and run dust, a command-line utility for finding what is using up storage space. https://github.com/bootandy/dust
# Run the following commands in a terminal (commented out lines can be ignored):
# Change Directory to the downloads directory (assuming Mac OS here).
cd ~/Downloads
# Download the latest version of Dust.
curl -LO https://github.com/bootandy/dust/releases/download/v0.5.1/dust-v0.5.1-x86_64-apple-darwin.tar.gz
# Unpack the dust archive.
Last login: Mon Apr 20 19:55:22 on ttys000
~ $ ffmpeg -codecs
ffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developers
built with Apple clang version 11.0.0 (clang-1100.0.33.17)
configuration: --prefix=/usr/local/Cellar/ffmpeg/4.2.2_2 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librubberband --enable-libsnappy --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-libsoxr --enable-videotoolbox --disable-libjack --disable-indev=jack
libavutil 56. 31.100 / 56. 31.100
libavcodec 58
<!DOCTYPE html>
<html>
<head>
<title>Distrify Fluidvids Demo</title>
</head>
<body>
<iframe src="https://embeds.distrify.com/player/9HzvRg" width="640" height="360" frameborder="0" scrolling="no" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
<script type="text/javascript" src="https://raw.githubusercontent.com/toddmotto/fluidvids/master/dist/fluidvids.min.js"></script>
#known = {'ponderous' => 2, 'poisoning' => 3} # companies
#known = {'setting' => 1} # devolve
#known = {'capacity' => 3} # creating
#known = {'merciless' => 1, 'completes' => 2, 'monitored' => 1 }
#known = {'rearguard' => 1, 'fortified' => 3, 'concerned' => 5} # conducted (guess of two)
#known = {'depending' => 3, 'decisions' => 2} # reprimand
known = {} # origins
def matches(word, other_word, number)
word = word.split(//)
@dougal
dougal / cpuinfo.txt
Last active November 15, 2016 19:33
Packet.net Type 2a - Dual Cavium ThunderX ARMv8
root@eric:~# cat /proc/cpuinfo
processor : 0
BogoMIPS : 200.00
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics
CPU implementer : 0x43
CPU architecture: 8
CPU variant : 0x1
CPU part : 0x0a1
CPU revision : 1
@dougal
dougal / info.txt
Last active October 26, 2016 11:02
Elixir Registry Benchmarks, 2016-10-26, Revision b1d70af
dougal@xeoncopter:~/registry$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.1 LTS
Release: 16.04
Codename: xenial
dougal@xeoncopter:~/registry$ uname -a
Linux xeoncopter 4.4.0-42-generic #62-Ubuntu SMP Fri Oct 7 23:11:45 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
@dougal
dougal / date_parse_bm.rb
Created October 13, 2016 11:33
Custom date parser vs. Date.parse for Hyphenated ISO 8601 dates
require 'date'
require 'benchmark/ips'
def custom_date_parse(str)
Date.new(str[0,4].to_i, str[5,2].to_i, str[8,2].to_i)
end
Benchmark.ips do |x|
x.time = 5
x.warmup = 2
class OrderCreator
def initialize(order_klass=Order, tax_calculator_klass=TaxCalculator)
end
def create(order_params)
order = order_klass.new(order_params)
tax_service = tax_calculator_klass.new
order = tax_service.calculate(order)
This file has been truncated, but you can view the full file.
dtrace: 17114 dynamic variable drops with non-empty dirty list
55855/0x139370c: thread_selfid(0x7FB67BD01620, 0x7FB67BD015F0, 0x7FB67BD003A0) = 20526860 0
55855/0x139370c: csops(0x0, 0x0, 0x7FFF5A772670) = 0 0
55855/0x139370c: issetugid(0x0, 0x0, 0x7FFF5A772670) = 0 0
55855/0x139370c: shared_region_check_np(0x7FFF5A770568, 0x0, 0x7FFF5A772670) = 0 0
55855/0x139370c: stat64("/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation\0", 0x7FFF5A7718E8, 0x7FFF5A772670) = 0 0
55855/0x139370c: stat64("/usr/lib/libSystem.B.dylib\0", 0x7FFF5A7718E8, 0x7FFF5A772670) = 0 0
55855/0x139370c: stat64("/usr/local/opt/gmp/lib/libgmp.10.dylib\0", 0x7FFF5A7718E8, 0x7FFF5A772670) = 0 0
55855/0x139370c: open("/usr/local/opt/gmp/lib/libgmp.10.dylib\0", 0x0, 0x0) = 3 0
55855/0x139370c: pread(0x3, "\317\372\355\376\a\0", 0x1000, 0x0) = 4096 0