Skip to content

Instantly share code, notes, and snippets.

View clipboard-provider
#!/bin/bash
#
# clipboard provider for neovim
#
# :help provider-clipboard
exec 2>> ~/clipboard-provider.out
set -x
: ${COPY_PROVIDERS:=tmux osc52}
View -
$ 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)
View after-reboot.sh
#!/bin/sh
sudo enter-chroot -u root -b sh -c '
install -d -m 0755 /var/run/sshd
/usr/sbin/sshd -D
'
View vagrant-ssh-debug.txt
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 Feb 4, 2017
envbash/bienvenue example
View settings.py
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 Dec 18, 2016
bread recipe
View bread.md

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
View 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 Jul 18, 2015
verify_weebly_install_params
View gist:bae5c8c86e57cd3bf070
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
@agriffis
agriffis / lazy_collection.py
Last active Aug 29, 2015
LazyCollectionMixin
View lazy_collection.py
class LazyCollectionMixin(object):
__len__ = new_method_proxy(len)
__contains__ = new_method_proxy(operator.contains)
def __iter__(self):
# Don't define this as
# __iter__ = new_method_proxy(iter)
# because that creates a method which doesn't call yield,
# so it executes setup immediately.
if self._wrapped is empty:
@agriffis
agriffis / gist:9798319
Created Mar 27, 2014
Test script for signal handling in heroku-buildpack-pgbouncer
View gist:9798319
#!/bin/bash
psmgr=/tmp/waiting-fifo
rm -f $psmgr
mkfifo $psmgr
pids=( $$ )
(
echo one-start