Skip to content

Instantly share code, notes, and snippets.

View kylekrall's full-sized avatar
😎

Kyle Krall kylekrall

😎
View GitHub Profile

Keybase proof

I hereby claim:

  • I am kylekrall on github.
  • I am kylekrall (https://keybase.io/kylekrall) on keybase.
  • I have a public key whose fingerprint is 71D5 8955 2B7D A38C 167D 3523 3AA9 8BBF 0CE0 3BFC

To claim this, I am signing this object:

@kylekrall
kylekrall / gist:8967799
Created February 13, 2014 01:06
Quick check via knife ssh for reboot-required packages (machines managed by Chef)
knife ssh -i ~/.ssh/key.pem "name:node-name*" "if test -e /var/run/reboot-required;then hostname && cat /var/run/reboot-required.pkgs|wc -l;fi"
@kylekrall
kylekrall / gist:8946831
Last active August 29, 2015 13:56
Logstash + Kibana + Nginx + Google_Auth_Proxy - Authentication w/ Google OAuth2 using bit.ly's google_auth_proxy - Restrict dashboard editing to specific users
location ~ ^/kibana-int/dashboard/.*$ {
set $privs NA; # by default, no privs needed
proxy_read_timeout 90;
if ( $request_method ~ (PUT|DELETE) ) {
set $privs M; # M for modify
}
if ( $remote_user ~ (admin1|admin2|admin3|admin4) ) {
set $privs "${privs}Y"; # Y for admin
}
@kylekrall
kylekrall / gist:8075219
Created December 21, 2013 21:16
OSX FileVault - fdesetup
kMac:~ kyle$ fdesetup help
Sets up FileVault for the current boot volume.
Usage: fdesetup <verb> <options>
Use the man page for expanded help.
Verbs:
help
enable Enable FileVault and optionally add user(s)
disable Disable FileVault
status Return current FileVault status
add Add user(s) to existing FileVault
@kylekrall
kylekrall / gist:6195800
Created August 9, 2013 18:14
Fun with Chef, MOTD, and TOIlet
# install toilet for fun ascii fonts
package "toilet" do
action :install
end
# add hostname to motd.tail
execute "hostname-motd" do
command "toilet -w 180 -f mono12 --gay `hostname` > /etc/motd.tail"
not_if {File.exists?("/etc/motd.tail")}
end
@kylekrall
kylekrall / gist:6158124
Created August 5, 2013 18:15
Public NPM registry @ isaacs.iriscouch.com/registry is down!
[Mon, 05 Aug 2013 15:18:07 GMT] [error] [<0.22253.13>] ** Generic server <0.22253.13> terminating
** Last message in was {'EXIT',<0.22252.13>,
{db_not_found,
<<"could not open http://isaacs.iriscouch.com/registry/">>}}
** When Server state == {state,"http://isaacs.iriscouch.com/registry/",20,[],
[],
{[],[]}}
** Reason for termination ==
** {db_not_found,<<"could not open http://isaacs.iriscouch.com/registry/">>}
@kylekrall
kylekrall / gist:5050397
Last active December 14, 2015 07:28
Basic Chef Role for node.js server from source (default). All cookbooks are Opscode Community Cookbooks.
name "nodejs-server"
description "basic nodejs server from source"
run_list(
"recipe[apt]",
"recipe[ohai]",
"recipe[build-essential]",
"recipe[nodejs]"
)