Skip to content

Instantly share code, notes, and snippets.

# Configuration for Alacritty, the GPU enhanced terminal emulator
# Any items in the `env` entry below will be added as
# environment variables. Some entries may override variables
# set by alacritty it self.
env:
# TERM env customization.
#
# If this property is not set, alacritty will set it to xterm-256color.
[diff "ansible-vault"]
textconv = "ansible-vault view --vault-password-file=.vault_password"
cachetextconv = false
@tmiller
tmiller / init.lua
Last active June 11, 2018 11:13
Replace moom and the likes with Hammerspoon
hs.window.animationDuration = 0
local screenMode = hs.hotkey.modal.new('cmd', 'm')
function screenMode:entered()
alertUuids = hs.fnutils.imap(hs.screen.allScreens(), function(screen)
return hs.alert.show('Move Window', hs.alert.defaultStyle, screen, true)
end)
end
function screenMode:exited()
module Main exposing (..)
import Html exposing (..)
import Html.Events exposing (onClick)
import Html.Attributes exposing (..)
type Direction
= North
| South

Keybase proof

I hereby claim:

  • I am tmiller on github.
  • I am tmiller (https://keybase.io/tmiller) on keybase.
  • I have a public key ASC1DS4FLm8kKVlEhaqVpGsRhFlXkFHroZdklKvya_905go

To claim this, I am signing this object:

#!/bin/bash
# Encrypt AWS Keys
gpg -ar <email-address> -e ~/.aws/credentials
# Decrypt AWS Keys
gpg -d ~/.aws/credentails.asc > ~/.aws/credentials
# Delete file when done working
srm ~/.aws/credentials
Crop* createCrop(/*... crop fields ...*/) {
// Create and return address of crop
}
enum names {
Garlic;
GreenBeen;
Kale;
Pasnip;
}
@tmiller
tmiller / events.js
Last active August 29, 2015 14:04
jQuery event sample
$(document).ready(function() {
$(document)
.on(
'ajax:before',
'form.single-line-qualification',
function(e) {
if (e.target[1].value.trim() === '') {
e.target[1].value = '';
alert('You must enter a name!');
return false;
@tmiller
tmiller / init.sh
Last active July 19, 2018 12:35
DigitalOcean ubuntu 14.04 server configuration script.
#!/bin/bash
username="ubuntu"
ssh_pub_key=""
# Setup user
adduser $username
usermod -a -G sudo $username
sudo mkdir -p "/home/${username}/.ssh"
sudo echo "${ssh_pub_key}" > "/home/${username}/.ssh/authorized_keys"
@tmiller
tmiller / Pair.hs
Last active August 29, 2015 14:03
Round robin tournament algorthim for generating coding pairs in Haskell
module Main where
import Data.List
data Coder = Coder String
| Nobody
deriving (Show)
data Pairings = Pair Coder Coder
| Pairs [Pairings]