Skip to content

Instantly share code, notes, and snippets.

View mmlb's full-sized avatar
🏠
Working from home

Manuel Mendez mmlb

🏠
Working from home
View GitHub Profile
{
"meta": {
"theme": "kendall"
},
"basics": {
"name": "Manuel Mendez",
"image": "https://avatars.githubusercontent.com/u/708570?s=400&u=5411ad531c2d6904582878395ce2be515da5663c&v=4",
"label": "Staff Software Engineer",
"email": "i@m.mmlb.dev",
"phone": "305-523-9213",
@mmlb
mmlb / README.md
Last active February 14, 2022 18:43
mermaid test

This is a test of mermaid support

Will this diagram work?

  graph TD;
      A-->B;
      A-->C;
      B-->D;
 C-->D;

Keybase proof

I hereby claim:

  • I am mmlb on github.
  • I am mmlb (https://keybase.io/mmlb) on keybase.
  • I have a public key ASAW-m3lg0lAbSoUokvPlcdqrVsKMspMfaiU-8vxFAJOCwo

To claim this, I am signing this object:

```
┌─ attnF ─ Fast 1
┌─┫
┫ └─ attnF ─ Fast 2
└── attnS ─ Slow
```
@mmlb
mmlb / Terraform-Blue-Green-AWS.md
Created January 7, 2016 15:19 — forked from ryan0x44/Terraform-Blue-Green-AWS.md
Blue-Green AWS Auto Scaling Deployments with Terraform

A quick note on how I'm currently handling Blue/Green or A/B deployments with Terraform and AWS EC2 Auto Scaling.

In my particular use case, I want to be able to inspect an AMI deployment manually before disabling the previous deployment.

Hopefully someone finds this useful, and if you have and feedback please leave a comment or email me.

Overview

I build my AMI's using Packer and Ansible.

#include <stdio.h>
#include <stdint.h>
#include <libnvpair.h>
static void print(nvlist_t *list, char *name) {
char *buf = NULL;
size_t blen;
int err;
if ((err = nvlist_pack(list, &buf, &blen, NV_ENCODE_XDR, 0)) != 0) {
printf("error:%d\n", err);
make: Entering directory `/home/ubuntu/mistify-os/build/buildroot'
/usr/bin/make -j1 O=/home/ubuntu/mistify-os/build/mistify/base HOSTCC="/usr/bin/gcc" HOSTCXX="/usr/bin/g++" silentoldconfig
make[1]: Entering directory `/home/ubuntu/mistify-os/build/buildroot'
GEN /home/ubuntu/mistify-os/build/mistify/base/Makefile
BR2_DEFCONFIG='' KCONFIG_AUTOCONFIG=/home/ubuntu/mistify-os/build/mistify/base/build/buildroot-config/auto.conf KCONFIG_AUTOHEADER=/home/ubuntu/mistify-os/build/mistify/base/build/buildroot-config/autoconf.h KCONFIG_TRISTATE=/home/ubuntu/mistify-os/build/mistify/base/build/buildroot-config/tristate.config BR2_CONFIG=/home/ubuntu/mistify-os/build/mistify/base/.config BR2_EXTERNAL=/home/ubuntu/mistify-os SKIP_LEGACY= /home/ubuntu/mistify-os/build/mistify/base/build/buildroot-config/conf --silentoldconfig Config.in
make[1]: Leaving directory `/home/ubuntu/mistify-os/build/buildroot'
/bin/sed -i -e "/\\<CONFIG_BLK_DEV_INITRD\\>/d" /home/ubuntu/mistify-os/build/mistify/base/build/linux-3.18.14/.co
@mmlb
mmlb / bad.sls.yaml
Created January 10, 2014 22:14
sls top-level order matters
crda:
pkg:
- installed
wireless-regdb:
pkg:
- installed
- sources:
- wireless-regdb: salt://regdb/regdb.deb
@mmlb
mmlb / gpsd.sls.yaml
Last active January 2, 2016 21:18
gpsd sls
gpsd:
pkg:
- installed
- sources:
- gpsd: salt://gpsd/gpsd.deb
- gpsd-clients: salt://gpsd/gpsd-clients.deb
- libgps20: salt://gpsd/libgps20.deb
- libgps-dev: salt://gpsd/libgps-dev.deb
- python-gps: salt://gpsd/python-gps.deb
file.managed:
@mmlb
mmlb / serial-block.c
Last active August 18, 2021 07:14
serial.c
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <termios.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <sys/signal.h>
#define DEVICE "/dev/ttyS1"