Skip to content

Instantly share code, notes, and snippets.

View detrohutt's full-sized avatar

A.J. Roberts detrohutt

  • Big Nerd Ranch
  • Georgia, US
View GitHub Profile
@detrohutt
detrohutt / keybase.md
Created April 11, 2021 15:55
Keybase verification

Keybase proof

I hereby claim:

  • I am detrohutt on github.
  • I am detrohutt (https://keybase.io/detrohutt) on keybase.
  • I have a public key ASBMdOypbvDc9rUNzjxLh6z-SN66O37nbjgZbQUC7PW39wo

To claim this, I am signing this object:

@detrohutt
detrohutt / initClient.js
Last active January 23, 2020 02:21
zeit/next.js/examples/with-apollo/lib/initClient.js -- changed to support subscriptions
import { ApolloClient, createNetworkInterface } from 'react-apollo'
import { SubscriptionClient, addGraphQLSubscriptions } from 'subscriptions-transport-ws'
const uri = 'http://localhost:4000/graphql'
const subscriptionsURI = 'ws://localhost:4000/'
let apolloClient = null
function _initClient (headers, initialState, subscriptionsInterface) {
return new ApolloClient({
initialState,
@detrohutt
detrohutt / 40-custom.rules
Created November 15, 2013 00:30
Save as /etc/polkit-1/rules.d/40-custom.rules and RESET i3!
/* -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- */
// Custom user-defined rules for polkit
//
// See the polkit(8) man page for more information
// about configuring polkit.
polkit.addRule(function(action, subject) {
if (action.id == "org.freedesktop.login1.suspend" ||
action.id == "org.freedesktop.login1.suspend-multiple-sessions" ||
@detrohutt
detrohutt / PKGBUILD
Last active December 28, 2015 04:39
udns PKGBUILD
# Maintainer: Christian Hesse <[email protected]>
# Contributor: Gaetan Bisson <[email protected]>
pkgname=udns
pkgver=0.2
pkgrel=1
pkgdesc='Stub DNS resolver library with ability to perform both syncronous and asyncronous DNS queries'
url='http://www.corpit.ru/mjt/udns.html'
license=('LGPL')
arch=('i686' 'x86_64' 'armv6h')
@detrohutt
detrohutt / gist:7051206
Created October 19, 2013 03:00
jade variable insertion
extends layout
block content
.container
#accordion.panel-group
- for (var i = 0; i < serviceList.length; i++)
.panel.panel-default
.panel-heading
h4.panel-title
a.accordion-toggle(data-toggle='collapse', data-parent='#accordion', href='#'+serviceList[i].name)