Skip to content

Instantly share code, notes, and snippets.

@joshfreemanIO
joshfreemanIO / fizz_buzz.rb
Last active August 29, 2015 14:21
FizzBuzz without Conditional Control Structures
def fizz_buzz(start, final)
set = {}
normal_values = [*start..final]
fizz_values = [*((start - start % 3)..final).step(3)]
buzz_values = [*((start - start % 5)..final).step(5)]
fizz_buzz_values = [*((start - start % 15)..final).step(15)]
normal_values.each do |number|
set[number] = number
@joshfreemanIO
joshfreemanIO / outline.md
Last active August 29, 2015 14:21
Git for Teams/Git as a Communication Tool

Git for Teams

  • Self Introduction
  • Interrupt if you have questions!

Purpose of Git

  • Source Code Version Control
    • Historical record of changes
  • Source Distribution
TDD
1. What is TDD?
- Red, Green, Refactor
2. What about BDD?
3. CQRS
4. Incoming Queries (Fibonacci)
- Fibonacci
+ 0 => 0
+ 1 => 1
@joshfreemanIO
joshfreemanIO / AI-to-iOS-Icon-Generator.jsx
Last active November 23, 2021 06:58
Given an Adobe Illustrator project, generate the images and Contents.json file for an iOS Application Icon
// Download http://cdnjs.cloudflare.com/ajax/libs/json3/3.3.2/json3.js
// and save as json3.js in the same directory as this script
//
// Move the new images and Contents.json into
// Assets.xcassets/AppIcon.appiconset/
#include "json3.js"
var manifest = [
{