Skip to content

Instantly share code, notes, and snippets.

@bobbrez
bobbrez / main.tf
Created March 27, 2022 23:37
Terraform / AWS VPN Creation
resource "aws_acm_certificate" "vpn_server" {
domain_name = "vpn.${var.zone_domain}"
validation_method = "DNS"
lifecycle {
create_before_destroy = true
}
}
resource "aws_acm_certificate_validation" "vpn_server" {
@bobbrez
bobbrez / index.md
Last active June 15, 2020 22:01
Fullstack App Development with React Native and AWS

Overview

There's a lot to learn and its easy to fall down a few different rabbit holes. What I recommend is starting with a simple app that mimics the core 80% of functionality found in most apps and then expanding from there. This way you get to learn as you go but all the while have the basis for something that can actually be deployed (vs feeling just like a toy to start all over again from.)

App Premise

We're going to build an app that will enable people to find or become remote coaches to others. This is a classic two-sided market app, where the value is in connecting two people together based on specific criteria.

User Stories

@bobbrez
bobbrez / Artnet-test.ino
Last active September 3, 2019 13:09
ESP32 + ArtNet
#include <WiFi.h>
#include <WiFiUdp.h>
#include <FastLED.h>
#include <Artnet.h>
#include "common.h"
#define DMX_ID "test-03"
#define DMX_LONGNAME "TEST 03"
#define DMX_SHORTNAME DMX_ID
@bobbrez
bobbrez / gist:fac3d9951427b90cdbec5978c5a79652
Created September 25, 2017 10:05
Removing the Apple FTDI drivers
sudo kextunload -b com.apple.driver.AppleUSBFTDI
sudo kextutil -b com.apple.driver.AppleUSBFTDI -p AppleUSBEFTDI-6010-1
@bobbrez
bobbrez / instructions.md
Last active January 20, 2016 08:56
Spark Developer Setup

Setup Java 1.7.u79

Scala 2.10 requires Java 7 (vs Java 8).

Download the Java SE SDK and install.

Verify that Java 1.7 is installed

$ java -version
@bobbrez
bobbrez / plan.md
Last active August 29, 2015 14:06
Sidekiq Dynamic Priorities

Purpose

SDP will add the ability to use queues with a scored priority using the SortedSet functionality in Redis. This will allow projects to add jobs to a dynamic queue with a numeric priority score. Jobs will then be processed from highest priority to the lowest. If a job is added with the highest priority, it will then be the next job to get pulled from the queue.

This will transparently augment the functionality in Sidekiq and will only provide additive functionality.

Example

As an example, a dynamic priority queue exists with workers Alpha and Beta. At time(0) the queue exists but workers have not pulled any jobs yet:

@bobbrez
bobbrez / sample.rb
Created August 19, 2014 21:47
Redis RPOPZADD for Ruby
require 'redis'
class Redis
REDIS_RPOPZADD = "
local value = redis.call('zrange', KEYS[1], -1, -1)[1]
local score = redis.call('zscore', KEYS[1], value)
redis.call('zremrangebyrank', KEYS[1], -1, -1)
redis.call('zadd', KEYS[2], score, value)
return { value, score }"
def rpopzadd(source, dest)
@bobbrez
bobbrez / keybase.md
Created April 1, 2014 19:58
keybase.md

Keybase proof

I hereby claim:

  • I am bobbrez on github.
  • I am bobbrez (https://keybase.io/bobbrez) on keybase.
  • I have a public key whose fingerprint is 71AA E2C8 2FE0 DD07 9197 10BF 5658 1DDF C278 1BCC

To claim this, I am signing this object:

@bobbrez
bobbrez / gist:6678139
Created September 23, 2013 22:56
How to do rendering from a model
Don't do this unless you need to.... its kinda punching MVC in the face.
@bobbrez
bobbrez / timestamp.cpp
Created August 23, 2013 13:50
C++ for Scott
#include <stdio.h> // for sprintf()
#include <iostream> // for console output
#include <string> // for std::string
#include <ctime>
using namespace std;
int main(int argc, const char * argv[])