Skip to content

Instantly share code, notes, and snippets.

View geoff-kruss's full-sized avatar

geoff geoff-kruss

View GitHub Profile
ecdsa-sha2-nistp521 AAAAE2VjZHNhLXNoYTItbmlzdHA1MjEAAAAIbmlzdHA1MjEAAACFBAEct1KnEdW2zZYEcGWDRqt8TOOd1KR9PXvE5Oes6wrLX0ffB4cAxSzmSFA2mZk8KkcYpEY/ShKZ+i3/XulH1XKtnQH7MDGiSBLhiQ6cH8zjby//4fpGti37z4Lb1lAxdmicXrQdU6EyoWFcOY/U2ISdiFMzPygR4XQhH2NcymYfTsDRdA==
63fsXFioT-h6iZb1SCW_5O3Azsxpfj2gUsL84SGAvxSvTZrh6xtYIi5MSjWwkzX3WIv-gQpTS0U4Niciq2mjGg==
! special
*.foreground: #c5c7be
*.background: #111110
*.cursorColor: #c5c7be
! black
*.color0: #1b1c1a
*.color8: #4be7b5
! red
# Ansible EC2 external inventory script settings
#
[ec2]
# AWS regions to make calls to. Set this to 'all' to make request to all regions
# in AWS and merge the results together. Alternatively, set this to a comma
# separated list of regions. E.g. 'us-east-1,us-west-1,us-west-2'
regions = eu-west-1
regions_exclude = us-gov-west-1,cn-north-1
#: set the Makefile shell to the users environment provided shell
SHELL=/usr/bin/env bash
#: set the OSTYPE var based on the shells OSTYPE environment variable
OSTYPE := $(shell echo $${OSTYPE})
#: generic info log function
#: logs in light blue
define log
echo -e "\033[1;34m==>\033[0m $(1)"
➜ wordpress git:(master) git push production master
Counting objects: 7333, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (6283/6283), done.
Writing objects: 100% (7333/7333), 41.19 MiB | 1.77 MiB/s, done.
Total 7333 (delta 794), reused 7327 (delta 791)
remote: Resolving deltas: 100% (794/794), done.
remote: git.wpengine.com: validating
remote: - warning: changes will be deployed to production application ...
remote: - info: validating files in 1539227 ...
@geoff-kruss
geoff-kruss / peerwatch.clj
Last active February 23, 2017 19:14
Datomic peer CloudWatch metrics
; Metric callback handler for pushing Datomic metrics to CloudWatch
;
; http://docs.datomic.com/monitoring.html
;
; Instructions:
; 1) Add CloudWatch sdk to your project.clj
;
; [com.amazonaws/aws-java-sdk-cloudwatch "1.11.6"]
;
; 2) Specify the handler function as the metrics callback handler with a java opt at run time
-module(talbot_server).
-author('geoff_kruss').
-behaviour(gen_server).
-include("talbot.hrl").
%% gen_server callbacks
-export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]).
@geoff-kruss
geoff-kruss / hailstone.erl
Created January 17, 2012 12:08
erlang hailstone
-module(hailstone).
-import(io).
-export([main/1]).
hailstone(1) -> [1];
hailstone(N) when N band 1 == 1 -> [N|hailstone(N * 3 + 1)];
hailstone(N) when N band 1 == 0 -> [N|hailstone(N div 2)].
main(End) ->
F = fun (N) -> length(hailstone(N)) end,