Skip to content

Instantly share code, notes, and snippets.

View wrburgess's full-sized avatar
:shipit:
Shippin'

Randy Burgess wrburgess

:shipit:
Shippin'
View GitHub Profile
@wrburgess
wrburgess / mma_building_blocks.md
Last active April 30, 2018 14:52
MMA V2 Building Blocks

MMA v2 Building Blocks

Initial Goals

  1. Setup a Hello World build of ReactNative
  2. Push through Fastlane to Apple Development and Android Development
  3. Figure out how the Firebase Testing Lab works
  4. Establish a push from ReactNative to Firebase Real Time Database

Communications

@wrburgess
wrburgess / counter.function.js
Created April 14, 2018 22:47 — forked from saintplay/counter.function.js
Add counter for Firestore Collection
// functions/income/counter.function.js
'use strict'
const functions = require('firebase-functions')
const admin = require('firebase-admin')
// Prevent firebase from initializing twice
try { admin.initializeApp(functions.config().firebase) } catch (e) {}
@wrburgess
wrburgess / Rails State Select
Created January 19, 2018 19:36 — forked from christo16/Rails State Select
Create a select list for US states in Rails
<%= select(:address, :state, [
['Select a State', 'None'],
['Alabama', 'AL'],
['Alaska', 'AK'],
['Arizona', 'AZ'],
['Arkansas', 'AR'],
['California', 'CA'],
['Colorado', 'CO'],
['Connecticut', 'CT'],
['Delaware', 'DE'],
@wrburgess
wrburgess / config.rb
Created December 26, 2017 05:43 — forked from bouchard/config.rb
Podcast XML/Builder Template for Middleman
page '/podcast.xml', layout: false
# Methods defined in the helpers block are available in templates
helpers do
def podcast_source_path(article)
"source/audio/#{article.data.file}"
end
end
@wrburgess
wrburgess / request.rb
Created July 28, 2017 19:48 — forked from nesquena/request.rb
Rails Request Logging
Rails.logger.info "REQUEST INSPECTOR"
Rails.logger.info " [REQUEST_URI] #{request.headers['REQUEST_URI'].inspect}"
Rails.logger.info " [RAW_POST]: #{request.raw_post.inspect}"
Rails.logger.info " [PARAMS]: #{request.params.inspect}"
Rails.logger.info " [HTTP_AUTHORIZATION] #{request.headers['HTTP_AUTHORIZATION'].inspect}"
Rails.logger.info " [CONTENT_TYPE]: #{request.headers['CONTENT_TYPE'].inspect}"
Rails.logger.info " [HTTP_ACCEPT] #{request.headers['HTTP_ACCEPT'].inspect}"
Rails.logger.info " [HTTP_HOST] #{request.headers['HTTP_HOST'].inspect}"
Rails.logger.info " [HTTP_USER_AGENT] #{request.headers['HTTP_USER_AGENT'].inspect}"
@wrburgess
wrburgess / sidekiq
Created July 27, 2017 17:58 — forked from neilmarion/sidekiq
sidekiq clear counter
Sidekiq.redis {|c| c.del('stat:processed') }
and to reset failed jobs:
Sidekiq.redis {|c| c.del('stat:failed') }
bundle exec sidekiq -q high,5 default
RAILS_ENV=production bundle exec sidekiq -d -L /home/deployer/apps/collector/shared/sidekiq.log -q high,5 default
@wrburgess
wrburgess / unit_test_activity.md
Last active July 15, 2017 15:26
Unit Test Activity using Jest

Unit Test Activity with Jest

Objective

Write a simple function that takes two numbers as arguments and multiplies them with 100% test coverage using TDD

Steps

  1. Create a new directory called calculator-app and cd into it
  2. Set up your git repo correctly with the proper npm entries in .gitignore
@wrburgess
wrburgess / stuff.md
Last active June 29, 2017 18:14
Weekend Ideas

Logan Square Day

  • 11am Parson's Chicken & Fish, Table Games
  • 3pm Park & Field Bocce Courts
  • 6pm Longman & Eagle Dinner
  • 9pm Boiler Room Cocktails

River North/Lincoln Park Day

  • 12pm Drinks & Snacks at Tiny Tapp Cafe, Chicago Riverwalk
@wrburgess
wrburgess / app_display_tools.js
Created February 24, 2017 23:37
Application Display Tools with JavaScript
// JavaScript Techniques for Selectors
var something = document.getElementById("the-id-name");
var something = document.getElementsByTagName("p");
var something = document.getElementsByClassName("class-name");
var something = document.querySelector("#id-name");
var something = document.querySelector(".class-name");
var something = document.querySelector("element");
var something = document.querySelectorAll("p.intro");
@wrburgess
wrburgess / app-boilerplate.html
Last active February 26, 2017 16:53
jquery app template
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>jQuery App Template</title>
<!-- Added link to the jQuery Library -->
<script src="https://code.jquery.com/jquery-3.1.1.js"></script>
<!-- Added a link to Bootstrap-->