Skip to content

Instantly share code, notes, and snippets.

View trisweb's full-sized avatar
🕶️

Tristan Harward trisweb

🕶️
View GitHub Profile
@trisweb
trisweb / compose.openwakeword.yml
Created October 22, 2023 02:45
Home Assistant Docker Compose Configurations
# Wyoming OpenWakeWord
version: '3.3'
services:
wyoming-openwakeword:
restart: unless-stopped
volumes:
- './data:/data'
ports:
- '10400:10400'
image: rhasspy/wyoming-openwakeword
@trisweb
trisweb / lastfm_nowplaying.css
Last active April 11, 2022 17:31
Last.fm Now Playing Widget. Just add to a <script> and <style> tag on your site, or load from files, and call getNowPlaying() on page load.
.now-playing {
position: absolute;
right: 20px;
top: calc(50vh - (min(20vw, calc(100vh - 30px)) / 2, 400px));
z-index: 1001;
}
a.now-playing {
opacity: 1;
border: 0;
@trisweb
trisweb / gifgen
Last active September 11, 2019 23:54
Gifgen: ffmpeg gif generator script
#!/bin/bash
###############################################################################
# gifgen: a simple script to generate gifs
###############################################################################
# Usage:
# > gifgen [input.mov] [output.gif]
#
# [output.gif] is optional; if not given, filename will be auto-generated.
#
@trisweb
trisweb / .bashrc
Last active July 12, 2019 15:41 — forked from bcarlin/.bashrc
Alias for sublime text to automatically open a project when calling "subl" if a .sublime-project file is found in the current directory. This alias declaration to put in a bashrc file.
# SublimeText auto-open project in current directory if it exists and argument is . or blank.
function project_aware_subl {
project_file=$(ls *.sublime-project 2>/dev/null | head -n 1)
if [[ ( ! -z "$project_file" ) && ( "${*}" == "." || -z "${*}") ]]
then
command subl "$project_file"
else
command subl ${*}
fi
}

Keybase proof

I hereby claim:

  • I am trisweb on github.
  • I am trisweb (https://keybase.io/trisweb) on keybase.
  • I have a public key whose fingerprint is 6FE9 8633 0681 EB01 618A 703C 666A A2D8 61C1 7994

To claim this, I am signing this object:

@trisweb
trisweb / survey.html
Created July 9, 2014 20:09
Angular Survey using Firebase
<!DOCTYPE html>
<html ng-app="MyApp">
<!-- Made by Tristan Harward. BSD Licensed (because Berkeley > MIT) -->
<!--
Copyright (c) 2014, Tristan S. Harward
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
@trisweb
trisweb / postgresql.rb
Created June 4, 2012 17:58
Homebrew PostgreSQL 9.2 Beta 2 Formula
require 'formula'
class Postgresql < Formula
homepage 'http://www.postgresql.org/'
url 'http://ftp.postgresql.org/pub/source/v9.2.0beta2/postgresql-9.2beta2.tar.bz2'
md5 'f23eca70a6de56de73f0005a571c71b0'
depends_on 'readline'
depends_on 'libxml2' if MacOS.leopard? # Leopard libxml is too old
depends_on 'ossp-uuid'

Engineering Infrastructures For Humans

May 21, 2012 Mirrored from http://www.standalone-sysadmin.com/blog/2012/05/engineeringinfrastructures/

I’ve been lucky enough to have the chance to fly a lot over the past year or so. Working with Stephen Foskett and the rest of the Tech Field Day crew means that I’ve been to California almost every month. That’s a lot of flying.

One of the things that I’ve noticed on my flights is that they don’t want you to smoke. You actually used to be able to smoke on planes, which seems weird now that you can’t even smoke outide.

I’m not a smoker, so it doesn’t bother me. (As an adorable aside, when I was five years old, I literally glued hand-made no-smoking signs to the walls of my grandparents’ house. They were less than amused.) But the occasional legacy arm-rest with an ashtray harkens back to days of yore when every Joe Cool enjoyed the wonders of aviation while kicking back on a flight as smooth as a Laramie cigarette. He probably got a full meal as part of his ticket

@trisweb
trisweb / airfoil_wrapper.rb
Created May 3, 2012 17:01
A wrapper for linux airfoilspeakers command to restart when it inevitably crashes.
#!/usr/bin/env ruby
# Ctrl-C
Signal.trap 'INT' do
puts "Exiting!"
exit(0)
end
puts "Starting Airfoil Speakers..."
while 1
@trisweb
trisweb / streamit.rb
Created May 3, 2012 01:23
Script to run an esound stream from soundflower to a pulseaudio server
#!/usr/bin/env ruby
# Requirements:
# - A PulseAudio server running at the host in TO below.
# - SoundFlower installed
# - ESound installed (on mac, brew install esound)
# Select SoundFlower (2ch) as both Input AND Output devices, then run "streamit start"
# otherwise you don't have to worry about anything; it's a daemon, will run in the background,
# once you're finished just kill esd or run "streamit stop"