Skip to content

Instantly share code, notes, and snippets.

@agriffis
agriffis / reghex.py
Last active March 27, 2018 05:41
reghex checker
#!/usr/bin/env python3
#
# reghex.py -- checker for reghex puzzle
#
# Input on stdin in the following format:
#
# XXXXXXX
# XXXXXXXX
# XXXXXXXXX
# XXXXXXXXXX
@agriffis
agriffis / chr
Last active March 13, 2018 14:12
chrome os startup
#!/bin/bash
#
# chr -- wrapper for enter-chroot to run setup after reboot
#
set -e
main() {
declare name
case $1 in
@agriffis
agriffis / .vimrc
Created March 2, 2018 02:59
EnableBracketedPaste
function! EnableBracketedPaste()
" Enable bracketed paste everywhere. This would happen automatically on
" local terms, even with mosh using TERM=xterm*, but doesn't happen
" automatically in tmux with TERM=screen*. Setting it manually works fine.
if ! has("gui_running") && exists('&t_BE') && &t_BE == ''
let &t_BE = "\e[?2004h" " enable
let &t_BD = "\e[?2004l" " disable
let &t_PS = "\e[200~" " start
let &t_PE = "\e[201~" " end
endif
#!/bin/bash
#
# clipboard provider for neovim
#
# :help provider-clipboard
exec 2>> ~/clipboard-provider.out
set -x
: ${COPY_PROVIDERS:=tmux osc52}
@agriffis
agriffis / gist:2481292
Created April 24, 2012 16:37
.bashrc.virtualenvwrapper
# Dynamically load virtualenvwrapper functions to reduce shell startup
# time.
#
# Copyright 2012 Aron Griffis <aron@arongriffis.com>
# Released under the GNU GPL v3
#######################################################################
# Python virtualenvwrapper loads really slowly, so load it on demand.
if [[ $(type -t workon) != function ]]; then
virtualenv_funcs=( workon deactivate mkvirtualenv )
@agriffis
agriffis / -
Created January 20, 2018 21:13
$ lein repl
WARNING: boolean? already refers to: #'clojure.core/boolean? in namespace: cljs.util, being replaced by: #'cljs.util/boolean?
Error loading cider.nrepl.middleware.test: java.lang.RuntimeException: Invalid token: ::clojure.test/once-fixtures, compiling:(cider/nrepl/middleware/test.clj:129:57)
Exception in thread "main" java.lang.RuntimeException: Unable to resolve var: cider.nrepl.middleware.test/wrap-test in this context, compiling:(/tmp/form-init5686818134533198598.clj:1:8221)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:7010)
at clojure.lang.Compiler.analyze(Compiler.java:6773)
at clojure.lang.Compiler.analyze(Compiler.java:6729)
at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3881)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:7005)
at clojure.lang.Compiler.analyze(Compiler.java:6773)
#!/bin/sh
sudo enter-chroot -u root -b sh -c '
install -d -m 0755 /var/run/sshd
/usr/sbin/sshd -D
'
INFO global: Vagrant version: 1.8.5
INFO global: Ruby version: 2.3.3
INFO global: RubyGems version: 2.5.2
INFO global: VAGRANT_EXECUTABLE="/usr/share/vagrant/bin/vagrant"
INFO global: VAGRANT_INSTALLER_EMBEDDED_DIR="/var/lib/vagrant"
INFO global: VAGRANT_INSTALLER_VERSION="2"
INFO global: VAGRANT_INTERNAL_BUNDLERIZED="1"
INFO global: VAGRANT_DETECTED_OS="Linux"
INFO global: VAGRANT_INSTALLER_ENV="1"
INFO global: VAGRANT_LOG="debug"
@agriffis
agriffis / settings.py
Last active February 4, 2017 22:06
envbash/bienvenue example
from bienvenue import make_env_reader
from envbash import load_envbash
# Where are we?
DREAMHOST = 'dreamhost' in open('/etc/resolv.conf').read()
DEVELOPMENT = not DREAMHOST
# Load env.bash
if DREAMHOST:
load_envbash(os.path.expanduser('~/env.bash'))
@agriffis
agriffis / bread.md
Last active December 18, 2016 22:16
bread recipe

Wheat Bread

  • 1 package (1/4 oz) active dry yeast
  • 2¼ cups warm water (115°F)
  • 2 Tbsp sugar
  • 1 Tbsp salt
  • 2 Tbsp safflower oil
  • 2½ cups bread flour
  • 2½-3 cups whole wheat flour