Skip to content

Instantly share code, notes, and snippets.

View gemfarmer's full-sized avatar

Brian Hedberg gemfarmer

View GitHub Profile
@gemfarmer
gemfarmer / gist:6aacf3f197331da19f4e
Created October 1, 2014 19:12
targeting inspected scope
s = angular.element($0).scope();
@gemfarmer
gemfarmer / rails server issue
Created June 28, 2015 04:50
rails server issue
➜ Athlead git:(master) ✗ rails server
Usage:
rails new APP_PATH [options]
Options:
-r, [--ruby=PATH] # Path to the Ruby binary of your choice
# Default: /Users/brianhedberg/.rbenv/versions/2.0.0-p481/bin/ruby
-m, [--template=TEMPLATE] # Path to some application template (can be a filesystem path or URL)
[--skip-gemfile], [--no-skip-gemfile] # Don't create a Gemfile
-B, [--skip-bundle], [--no-skip-bundle] # Don't run bundle install
@gemfarmer
gemfarmer / PermutationStep
Created September 29, 2013 22:10
Input a number Output the next largest number using the same combination of numbers.
function PermutationStep(num) {
var numString = num.toString();
var numArray = numString.split("")
var numArrayStart = [];
var numArrayEnd = [];
for (var i = numArray.length-1; i>0; i--) {
if(Number(numArray[i])<Number(numArray[i+1])){
numArrayStart.push(numString.substring(0,i))
@gemfarmer
gemfarmer / spliceClean
Created October 5, 2013 21:03
The same as .splice(), but without side effects. "replace" can be several items and the funciton will still work cleanly
var spliceClean = function(arr, start, numToReplace, replace) {
var end = (start+numToReplace-1)
var newArray = [];
for (i=0; i<arr.length; i++){
(i < start) ? newArray.push(arr[i]) : console.log("rejected")
}
for (i=3; i<arguments.length; i++){
newArray.push(arguments[i])
@gemfarmer
gemfarmer / Reciprocity.md
Last active December 26, 2015 21:49
Reciprocity is an app that helps someone create tasty meals with as much of their cupboard as possible. It is a recipe generator that leverages the popularity of ingredient combinations and the absolute popularity of ingredients to suggest combinations based on previously specified ingredients. Community is a large part of the food world, so inc…

Reciprocitry (working title)

Backend

Technologies

  1. CoffeeScript, Node.js/Express
  2. Node.js/Express
  3. MongoDB
  4. Socket.io
  5. APIs (Food2Fork): http://food2fork.com/about/api
@gemfarmer
gemfarmer / Clothing Temp App.md
Last active December 26, 2015 21:49
The Clothing

Clothing Temp App (working title)

Backend

Technologies

  1. CoffeeScript
  2. Node.js/Express
  3. MongoDB
  4. Socket.io
  5. APIs (Geolocating):
@gemfarmer
gemfarmer / Food Truck Tracker.md
Last active December 26, 2015 21:59
Food Truck Tracker aggregates food truck location data to help customers find their favorite trucks!

Food Truck Tracker (working title)

Backend

Technologies

  1. CoffeeScript, Node.js/Express
  2. Node.js/Express
  3. MongoDB
  4. Socket.io
  5. APIs (Twitter, Open Street Map)
@gemfarmer
gemfarmer / Bootcamp Glassdoor.md
Last active December 27, 2015 00:19
Bootcamp Glassdoor would consolidate information about web development bootcamps to inform potential students of their options. Allow potential employers to browse bootcamps and base their hiring decision based on metrics provided Could potentially be expanded to include a variety of trade schools. A

Bootcamp Glassdoor (working title)

Backend

Technologies

  1. CoffeeScript, Node.js/Express
  2. Node.js/Express
  3. MongoDB
  4. Socket.io
@gemfarmer
gemfarmer / Veganizzm.md
Last active December 27, 2015 00:19
Create a web app and mobile app for my friend who runs veganizzm.com.

Veganizzm App

What would it do?

The app would allow you to..

  1. Search for vegan substitutes to non-vegan ingredients
  2. Search by vegan ingredients or recipe type
  3. House and display vegan recipes added to database
  4. NOT NECESSARY create miniature version of Reciprocity to generate recipes based on provided ingredients * Reciprocity prompts users to submit an ingredient and returns a list of ingredients that it is commonly paired with.
  • Example: Enter Kale -> Return Cashews, Raisins, etc.
@gemfarmer
gemfarmer / Ranked Choice Voting Algorithm
Created November 8, 2013 16:36
For Minneapolis Open JS
For Minneapolis Open JS