Skip to content

Instantly share code, notes, and snippets.

View tlockney's full-sized avatar
💭
Looking for what's next.

Thomas Lockney tlockney

💭
Looking for what's next.
View GitHub Profile
@tlockney
tlockney / deno-jupyter-test.ipynb
Last active July 3, 2024 05:26
A quick example of Deno.serve
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tlockney
tlockney / mp3-to-video.sh
Created March 1, 2023 05:02
Combine a jpeg file and mp3 to make a video
#!/usr/bin/env sh
# from https://superuser.com/a/1041818
ffmpeg -loop 1 -i img.jpg -i music.mp3 -shortest -acodec copy -vcodec mjpeg result.mkv
#!/usr/bin/env bash
set -euo pipefail
shopt -s inherit_errexit
# Make sure HandBrakeCLI is in the path -- I've got it installed in ~/bin for now
# since it disappeared from Homebrew
PATH=$HOME/bin:$PATH
MOVIES=$HOME/Movies
NAS_DIR=/Volumes/Media/Movies
@tlockney
tlockney / enable.js
Created October 15, 2022 18:44
Enable TweetDeck Beta
// enter the following into the js console of your browser
document.cookie = "tweetdeck_version=beta"
{"lastUpload":"2020-11-24T02:26:27.428Z","extensionVersion":"v3.4.3"}
@tlockney
tlockney / boxstarter.ps1
Last active August 28, 2018 04:27 — forked from jessfraz/boxstarter.ps1
Boxstarter Commands for a new Windows box.
# Description: Boxstarter Script
# Author: Jess Frazelle <[email protected]>
# Last Updated: 2017-09-11
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned
#
# Run this boxstarter by calling the following from an **elevated** command-prompt:
@tlockney
tlockney / reading.md
Last active March 29, 2017 03:47
How I read so much

I've been asked by a few colleagues how I manage to read so much, so I thought I'd just write this up once so I can link to it later. :~)

First, here are a few articles that touch on some of the keys to how I read so much and how I make sure I remember the important bits:

I can’t say I follow these exact principles – among other things, I’m definitely less diligent about some of my reading than what they outline. But that’s a conscious choice in many (but not all) cases.

@tlockney
tlockney / either example
Created September 14, 2016 17:21
Simple example of right-biased Either
[info] Loading global plugins from /Users/tlockn/.sbt/0.13/plugins
[info] Set current project to eitherdemo (in build file:/Users/tlockn/tmp/eitherDemo/)
SBT  eitherdemo  set scalaVersion := "2.11.7"
[info] Defining *:scalaVersion
[info] The new value will be used by *:allDependencies, *:crossScalaVersions and 12 others.
[info] Run `last` for details.
[info] Reapplying settings...
[info] Set current project to eitherdemo (in build file:/Users/tlockn/tmp/eitherDemo/)
SBT  eitherdemo  console
[info] Updating {file:/Users/tlockn/tmp/eitherDemo/}eitherdemo...
@tlockney
tlockney / tmux.conf
Last active May 18, 2017 13:53
Make tmux awesome (probably not nearly as awesome as it *could* be)
# set the command prefix to `
set -g prefix "`"
unbind C-b
bind "`" send-prefix
# listen to alerts from all windows
set -g bell-action any
set -g default-shell /usr/local/bin/fish
set -g default-command fish
function ct
# infer a session name from the current dir and normalize it for a valid tmux session name
set -g session (basename (pwd) | sed 's/[\.\-]/_/g')
tmux attach -t $session; or tmux new-session -s $session
end