Skip to content

Instantly share code, notes, and snippets.

@bobbrez
bobbrez / index.md
Last active Jun 15, 2020
Fullstack App Development with React Native and AWS
View index.md

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

View Artnet-test.ino
#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
View gist:fac3d9951427b90cdbec5978c5a79652
sudo kextunload -b com.apple.driver.AppleUSBFTDI
sudo kextutil -b com.apple.driver.AppleUSBFTDI -p AppleUSBEFTDI-6010-1
@bobbrez
bobbrez / instructions.md
Last active Jan 20, 2016
Spark Developer Setup
View instructions.md

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 Aug 29, 2015
Sidekiq Dynamic Priorities
View plan.md

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 Aug 19, 2014
Redis RPOPZADD for Ruby
View sample.rb
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)
View 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 Sep 23, 2013
How to do rendering from a model
View gist:6678139
Don't do this unless you need to.... its kinda punching MVC in the face.
View timestamp.cpp
#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[])
View application.js
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// compiled file.
//
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD