Skip to content

Instantly share code, notes, and snippets.

View tlockney's full-sized avatar

Thomas Lockney tlockney

View GitHub Profile
@tlockney
tlockney / init.lua
Last active December 28, 2024 00:26
function launchAppOnHotkey(modifiers, key, appName)
hs.hotkey.bind(modifiers, key, function()
local app = hs.application.find(appName)
if app == nil then
hs.application.launchOrFocus(appName)
elseif app:isFrontmost() then
app:hide()
else
local win = app:mainWindow()
spaces.moveWindowToSpace(win:id(), spaces.activeSpaceOnScreen())
local wezterm = require("wezterm")
local config = {}
config.automatically_reload_config = true
config.enable_tab_bar = false
config.window_close_confirmation = "NeverPrompt"
config.window_decorations = "RESIZE"
-- config.default_cursor_style = "BlinkingBar"
config.color_scheme = "Nord (Gogh)"
-- config.font = wezterm.font("FiraCode Nerd Font Mono")
@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...