Skip to content

Instantly share code, notes, and snippets.

@lancelakey
lancelakey / ansible_block.yml
Created February 2, 2016 12:05
Ansible always run and test afterwards
- name: Run some tests
hosts: all
tasks:
- block:
- name: block-1
command: /usr/bin/true
register: r1
- name: block-2

Keybase proof

I hereby claim:

  • I am lancelakey on github.
  • I am lancelakey (https://keybase.io/lancelakey) on keybase.
  • I have a public key whose fingerprint is E868 1810 B64E D19F FBB2 2A39 AA37 4DE7 B91F 05BA

To claim this, I am signing this object:

@lancelakey
lancelakey / gist:47c6ee9b2676f3f3b08a
Created April 17, 2015 09:58
Flambe ASG Lifecycle flows
ASG event > AS lifecycle hook > SNS topic > Lambda > Cloudwatch
ASG event > AS lifecycle hook > Custom Node.js server receives hook > Jenkins > Ansible > Cloudwatch
@lancelakey
lancelakey / logging.yml
Created December 17, 2014 18:11
/etc/elasticsearch/logging.yml
# you can override this using by setting a system property, for example -Des.logger.level=DEBUG
es.logger.level: INFO
rootLogger: ${es.logger.level}, console, file
logger:
# log action execution errors for easier debugging
action: DEBUG
# reduce the logging for aws, too much is logged under the default INFO
com.amazonaws: WARN
# gateway
@lancelakey
lancelakey / fpm_ruby.sh
Created November 12, 2014 07:01
FPM Ruby 2.0.x
#!/usr/bin/env bash
# Target OS: Debian
# On a new / clean installation of debian squeeze
# Install Ruby from source
# Create a Debian package using FPM
# Update apt
@lancelakey
lancelakey / gist:5ef70e5fa01a862d1c31
Created September 27, 2014 02:48
public ssh key
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAuq/3NdgLezywdsumgrQR8aBleZ6Qti/mDJm0yLvJ2kPx1lzmsojgV8EfV8Lu5MBh6gc7pUSF4S+i6HY+vetM4EOY3nYv9+hmDbW48oTpsBue49cgZrsWvZzn4h4a61rU+zWQRq4lX8E79Y2KoT+enB1uthP1033seVxtiTjIw3aFrI6dC7+vE+vEXtHINGEBfKuUsRKbH5QmJylrhi5WR28415zEYy0vXWCCzIlgfcrJ9OLKfLUJl2BwbCFO4FWL8rLozN5BM9b7D3W4jclCG1LCQqARkG5Z9bRId9+HlZW19grslE296wzaT8LRVvqFzWD+hrwEtLW5FIFIqT8irw== lance@pandastrike.com
[root@ip-10-229-28-201 ~]# ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 20
file size (blocks, -f) unlimited
pending signals (-i) 12987
max locked memory (kbytes, -l) unlimited
max memory size (kbytes, -m) unlimited
open files (-n) 999999
pipe size (512 bytes, -p) 8
@lancelakey
lancelakey / gist:3573faa050a122cc6693
Last active September 19, 2018 06:29
AWS CloudWatch custom metrics
### AWS scripts
These look trivial
http://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/mon-scripts-perl.html
http://aws.amazon.com/code/8720044071969977
### Diamond
Diamond is fairly popular and it looks like there's a built in way for Diamond to send metrics to AWS CloudWatch so maybe this is fairly easy
https://github.com/BrightcoveOS/Diamond
https://github.com/BrightcoveOS/Diamond/wiki/handler-cloudwatchHandler
[root@ip-172-31-4-113 ~]# lsmod
Module Size Used by
isofs 31387 0
crct10dif_pclmul 3607 0
crct10dif_common 1527 1 crct10dif_pclmul
crc32_pclmul 2459 0
ghash_clmulni_intel 3843 0
aesni_intel 128359 0
aes_x86_64 7510 1 aesni_intel
lrw 3545 1 aesni_intel
[root@ip-172-31-4-113 ~]# cat /etc/resolv.conf
# This file is managed by systemd-resolved(8). Do not edit.
#
# Third party programs must not access this file directly, but
# only through the symlink at /etc/resolv.conf. To manage
# resolv.conf(5) in a different way, replace the symlink by a
# static file or a different symlink.
nameserver 172.31.0.2
nameserver 8.8.8.8