Skip to content

Instantly share code, notes, and snippets.

@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 / -
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
@agriffis
agriffis / keybase.md
Created October 29, 2016 00:48
keybase.md

Keybase proof

I hereby claim:

  • I am agriffis on github.
  • I am agriffis (https://keybase.io/agriffis) on keybase.
  • I have a public key ASAG-vNw34R-v-jUZ7WrUrAU7E0UD16csjTPJMRQegh-sgo

To claim this, I am signing this object:

@agriffis
agriffis / gist:bae5c8c86e57cd3bf070
Created July 18, 2015 15:33
verify_weebly_install_params
import hashlib
import hmac
def verify_weebly_install_params(params, secret):
"""
Verifies the hmac of params on the Weebly install URL.
"""
# https://dev.weebly.com/oauth2.html