Skip to content

Instantly share code, notes, and snippets.

View excalq's full-sized avatar

Arthur Kepler excalq

View GitHub Profile
[Wed, 02 Apr 2014 12:28:12 -0700] INFO: Starting Chef Solo Run
/usr/local/ey_resin/ruby/lib/ruby/gems/1.8/gems/chef-0.6.0.4/lib/chef/node.rb:180:in `method_missing': Attribute default is not defined! (ArgumentError)
from /etc/chef-custom/recipes/cookbooks/main/attributes/default.rb:1:in `from_file'
from /usr/local/ey_resin/ruby/lib/ruby/gems/1.8/gems/chef-0.6.0.4/lib/chef/cookbook.rb:73:in `load_attributes'
from /usr/local/ey_resin/ruby/lib/ruby/gems/1.8/gems/chef-0.6.0.4/lib/chef/cookbook.rb:71:in `each'
from /usr/local/ey_resin/ruby/lib/ruby/gems/1.8/gems/chef-0.6.0.4/lib/chef/cookbook.rb:71:in `load_attributes'
from /usr/local/ey_resin/ruby/lib/ruby/gems/1.8/gems/chef-0.6.0.4/lib/chef/compile.rb:61:in `load_attributes'
from /usr/local/ey_resin/ruby/lib/ruby/gems/1.8/gems/chef-0.6.0.4/lib/chef/cookbook_loader.rb:107:in `each'
from /usr/local/ey_resin/ruby/lib/ruby/gems/1.8/gems/chef-0.6.0.4/lib/chef/cookbook_loader.rb:106:in `each_value'
from /usr/local/ey_resin/ruby/lib/ruby/gems/1.8/gems/chef-0.6.
23.23.192.96 gowatchit.com www.gowatchit.com mrqe.gowatchit.com ebert.gowatchit.com nytimes.gowatchit.com api.gowatchit.com radius.gowatchit.com
@excalq
excalq / tmux-window-keys.sh
Created July 23, 2012 16:55
Using Back/Forward Mouse/Keyboard media keys to change Tmux/Screen Windows
# These two shortcuts allow your media keyboard or mouse's back/forward keys to change windows in screen.
# This is designed to work with tmux or screen (using ctrl+a as the command shortcut) inside a Guake terminal
# You'll also need xdotool installed (aptitude install xdotool)
# Enter these as shortcuts in Ubuntu's "System Settings" > "Keyboard" > "Shortcuts" (tab) > "Custom Shortcuts"
# Previous/Back Key
xdotool search --onlyvisible --name Guake key ctrl+a p
# Next/Forward Key
xdotool search --onlyvisible --name Guake key ctrl+a n
@excalq
excalq / gist:4338714
Created December 19, 2012 17:48
Adding a Git Hook to prevent console.log() from appearing in your code

Place the code below into this file: (Inside your local project repo)

  .git/hooks/pre-commit
#!/bin/sh
 
if git rev-parse --verify HEAD >/dev/null 2>&1; then
 against=HEAD
@excalq
excalq / dev_clusters.rb
Created February 9, 2017 04:47
DevClusters - Build/Start/Stop an AWS cluster for a user
#!/usr/bin/env ruby
USER="arthur"
AWS_KEY="/Users/arthur/.ssh/DevClusters.pem"
CLUSTER_ROLES={ # Build in this order:
nfs: {image: 'ami-a0951573', name: 'devcluster-nfs', secgroups: ['sg-b37b7886','sg-aa7a697f'], count: 1},
redis: {image: 'ami-10201b69', name: 'devcluster-redis', secgroups: ['sg-b37b7886','sg-aa7a697f'], count: 1},
databrain: {image: 'ami-8a30206d', name: 'devcluster-databrain', secgroups: ['sg-b37b7886','sg-aa7a697f'], count: 1},
mysql: {image: 'ami-cc5b10fd', name: 'devcluster-mysql', secgroups: ['sg-b37b7886','sg-aa7a697f'], count: 2},
mongodb: {image: 'ami-56102071', name: 'devcluster-mongodb', secgroups: ['sg-b37b7886','sg-aa7a697f'], count: 2},
@excalq
excalq / letsencrypt-tool.sh
Created November 26, 2017 22:11
A Bash Script to Manage Creation & Renewal of Lets Encrypt Certificates
#!/bin/bash
# Klassica LetsEncrypt Generate/Autorenew Tool
# Pass an argument: create, renew
DOMAINS=("klassica.com" "www.klassica.com" "blog.klassica.com")
DRY_RUN="--dry-run --staging" # Comment out to run for real!
LE_DIR="/data/site-tools/letsencrypt/"
WEBROOT_DIR="/data/web/klassica.com/"
case "$1" in
# Note: This has to be run each time a subdomain is added or removed!
@excalq
excalq / kibana-Heatmap-Improvments.user.js
Last active February 26, 2018 17:57
Kibana Heatmap Colors for Relative Dates
// ==UserScript==
// @name Kibana App Data by Category Heatmap Improvments
// @namespace http://navgigatingcancer.com/
// @version 0.2
// @description Sets App Data Heatmap to use date-relative colors, fixes x-axis
// @author Arthur Kepler
// @match https://kibana.navigatingcare.com/*
// @match https://status.navigatingcare.com/*
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
// @grant none
@excalq
excalq / rails.rb
Last active September 18, 2018 13:49
A Logstash Grok Pattern for Rails 3
####################################
### Rais3 Log Grok (Unicorn and Thin supported at :info level)
## There are many non-capturing groups. For debugging, change them to named groups and use http://grokconstructor.appspot.com/do/match
#
## Assumes Rails is prepending :uuid to log lines, with one log per unicorn worker.
## Assumes the whole request is sent multiline (by Filebeat, not Logstash mulitline plugin)
#
## Add this to the Filebeat.yml prospector
## multiline:
# pattern: '\[[a-fA-F0-9]{32}\]( Started |$)'
@excalq
excalq / kepler-garage-readings.c
Last active September 8, 2019 19:33
ESP32 Sensors: DHT11 (Temp+Humidity), 150PSI Transducer [NodeMCU ESP32 Dev Board]
// ESP32 Sensors: DHT11 (Temp+Humidity), 150PSI Transducer [NodeMCU ESP32 Dev Board]
// REQUIRES the following Arduino libraries:
// - DHT Sensor Library: https://github.com/adafruit/DHT-sensor-library
// - Adafruit Unified Sensor Lib: https://github.com/adafruit/Adafruit_Sensor
#include "DHT.h"
#define DHTPIN 23 // Digital pin connected to the DHT sensor
// Feather HUZZAH ESP8266 note: use pins 3, 4, 5, 12, 13 or 14 --
@excalq
excalq / kepler-dvorak.karabiner-elements.json
Last active February 21, 2020 22:48
Kepler Dvorak for Karabiner Elements for Mac: Dvorak with Undo,Cut,Copy,Paste preserved as QWERTY
{
"title": "Kepler Dvorak Improved",
"rules": [
{
"description": "Use with Dvorak KB Layout. This remaps Left⌘+z,x,c,v to preserve QWERTY shortcuts. Right⌘ acts as Dvorak for these.",
"manipulators": [
{
"type": "basic",
"from": {