Skip to content

Instantly share code, notes, and snippets.

View jeffbr13's full-sized avatar

Ben Jeffrey jeffbr13

View GitHub Profile
@jeffbr13
jeffbr13 / spotify-install.sh
Created December 24, 2012 00:58
Installs Spotify's (experimental) client on Ubuntu. If the package installation fails, adds the Spotify repo to the sources list, updates the apt-cache, and then tries to install the client again.
# Installs Spotify client on Ubuntu.
# If installing the package fails, add the spotify repo to the sources list.
apt-get install spotify-client
if [[ $? -eq 0 ]]
then
exit 0
fi
@jeffbr13
jeffbr13 / site.hs
Created June 27, 2013 22:39
An attempt-in-progress at ordering posts by file modification time.
--------------------------------------------------------------------------------
{-# LANGUAGE OverloadedStrings, TupleSections #-}
import Control.Monad
import Data.List
import qualified Data.Map as M
import Data.Maybe
import Data.Ord
import Data.Monoid (mappend)
import Hakyll
import qualified Text.Pandoc.Options as Pandoc.Options
@jeffbr13
jeffbr13 / website.tld.nginx
Last active August 29, 2015 13:57
Nginx virtual host configuration with HTTPS and redirection for common variants.
## /etc/nginx/sites_enabled/website.tld
#
# Nginx virtual host configuration for <https://website.tld>,
# redirecting all traffic from <http[s]://[www.]website.tld>.
server {
server_name website.tld;
root /var/www/website.tld;
# HTTPS (IPv4)
@jeffbr13
jeffbr13 / wikipedia-subheading-links.js
Created April 28, 2014 23:56
Greasemonkey script to add link anchors to Wikipedia page subheadings
@jeffbr13
jeffbr13 / ckan.yaml
Created May 5, 2014 21:33
A complete Ansible playbook for installing CKAN
---
- hosts: all
sudo: yes
vars:
- db_name: ckan_default
- db_user: ckan_default
- db_password: ckan_default
- ckan_package_filename: 'python-ckan_2.2_amd64.deb'
#!/usr/bin/env bash
set -eu
echo $1
echo $2
gpg --encrypt --sign --armor --output=- --recipient "$2" "$1" | pbcopy

Keybase proof

I hereby claim:

  • I am jeffbr13 on github.
  • I am jeffbr13 (https://keybase.io/jeffbr13) on keybase.
  • I have a public key whose fingerprint is 0669 41B3 7683 41FB 4120 7CEB 32DB C4B7 AEA7 3FB6

To claim this, I am signing this object:

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Vue walkthrough</title>
<script src="https://unpkg.com/vue"></script>
<style>
body {