Skip to content

Instantly share code, notes, and snippets.

View dplummer's full-sized avatar
😀

Donald Plummer dplummer

😀
View GitHub Profile
+++ New Roster (Warhammer 40,000 9th Edition) [106 PL, 9CP, 1,993pts] +++
++ Battalion Detachment -3CP (T'au Empire) ++
+ Configuration +
Battle Size: 3. Strike Force (101-200 Total PL / 1001-2000 Points)
Detachment Command Cost
@dplummer
dplummer / dplummer.zsh-theme
Created August 12, 2019 18:17
dplummer.zsh-theme
# vim:ft=zsh ts=2 sw=2 sts=2
#
# dplummer's theme, mostly copied from agnoster's Theme - https://gist.github.com/3712874
# A Powerline-inspired theme for ZSH
#
# # README
#
# In order for this theme to render correctly, you will need a
# [Powerline-patched font](https://gist.github.com/1595572).
#
@dplummer
dplummer / gist:c74cab74f4aca21bcc4b1381b642f4f3
Created January 30, 2017 17:04
rebar3 report "DEBUG=1 mix deps.compile cuttlefish"
Rebar3 report
version 3.3.2
generated at 2017-01-30T17:00:54+00:00
=================
Please submit this along with your issue at https://github.com/erlang/rebar3/issues (and feel free to edit out private information, if any)
-----------------
Task: DEBUG=1
Entered as:
DEBUG=1 mix deps.compile cuttlefish
-----------------
@dplummer
dplummer / resolver.ex
Created October 5, 2016 17:27
recursive batch resolver for Absinthe
defmodule Grav.Resolver do
def resolve(protocol_module, args, field) do
{:ok, %{meta: meta} = root} = apply(protocol_module, :where, [args])
records_name = root |> Map.keys |> Enum.reject(& &1 in [:meta, :links, :linked]) |> hd
records = preload_associations(root[records_name], field |> derive_preloads)
{:ok, root |> Map.put(records_name, records) |> Map.merge(meta)}
end
@dplummer
dplummer / client.ex
Created June 18, 2016 00:01
resistance client
defmodule Client do
def connect(false, :undefined) do
IO.puts "Connecting to node"
connect Node.connect(:"[email protected]"), :undefined
end
def connect(true, :undefined) do
IO.puts "Finding main name"
connect true, find_main
@dplummer
dplummer / application.rb
Last active August 26, 2015 21:06
log silencer
# config/application.rb
class Application < Rails::Application
require 'log_silencer'
config.middleware.insert_before Rails::Rack::Logger,
LogSilencer,
silenced: /^\/options/
end
@dplummer
dplummer / alley.md
Last active August 29, 2015 14:23
calculate what players get free hand-me-down tanks from Armageddon

A total of 133 players will receive a free tank outside of what the top 30 clans get Created at 2015-06-20 08:53:49 -0700

Position Clan Licenses Used Unused
1 OTTER 100 72 28
2 ESPRT 100 62 38
3 PBKAC 100 60 40
4 BULBA 85 72 13
5 CHAI 60 60 0
@dplummer
dplummer / bloggo.conf
Created August 4, 2014 03:55
running go binary as service on ubuntu
# donaldplummer.com bloggo
description "donaldplummer.com blog"
start on (local-filesystems and net-device-up IFACE=lo and runlevel [2345])
stop on runlevel [!2345]
respawn
respawn limit 3 30
@dplummer
dplummer / defer_touching.rb
Created May 14, 2014 05:11
Delay and prevent multiple touches
module DeferTouching
def self.defer_touching(*klasses, &block)
to_touch = Set.new
old_methods = klasses.inject({}) do |acc, klass|
acc[klass] = klass.instance_method(:touch)
acc
end
klasses.each do |klass|
@dplummer
dplummer / sinewave_button.css
Created April 18, 2014 22:29
Sinewave button CSS
.sinewave-button {
-webkit-background-clip: border-box;
-webkit-background-origin: padding-box;
-webkit-background-size: auto;
-webkit-box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 0px 0px;
background-attachment: scroll;
background-clip: border-box;
background-color: transparent;
background-origin: padding-box;
background-size: auto;