Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View thedanotto's full-sized avatar

Daniel Otto thedanotto

  • Milwaukee, WI
View GitHub Profile
@thedanotto
thedanotto / es6.md
Last active November 5, 2018 19:40
es6 cheatsheet

Fat Arrow

function definition

let timesTwo = params => params * 2

// or

let timesTwo = params => {
  return params * 2;
https://api.yelp.com/v3/businesses/search?term=food&latitude=40.754766&longitude=-73.916454&radius=50&price=1,2,3,4
{
"total": 2,
"businesses": [
{
"review_count": 196,
"phone": "+17182551349",
"rating": 4,
"id": "homemade-taqueria-long-island-city",
https://api.yelp.com/v3/businesses/search?term=food&location=45-09+34th+Ave+Long+Island+City+ny+11101&radius=50&price=1,2,3,4
{
"businesses": [
{
"name": "The Alcove",
"coordinates": {
"latitude": 40.7460048214421,
"longitude": -73.9152161277393
},
require 'formula'
class Vim < Formula
homepage 'http://www.vim.org/'
url 'https://vim.googlecode.com/hg/', :revision => '6c318419e331'
version '7.3.515'
def features; %w(tiny small normal big huge) end
def interp; %w(lua mzscheme perl python python3 tcl ruby) end
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Node.js app detected
remote:
remote: -----> Creating runtime environment
remote:
remote: NPM_CONFIG_LOGLEVEL=error
remote: NPM_CONFIG_PRODUCTION=true
remote: NODE_ENV=production
@thedanotto
thedanotto / gist:ee6cbbe9074640f50e30
Last active August 29, 2015 14:15
Mongodb Rails App
# make sure you have mongodb installed
brew install mongodb
# in your first terminal tab you need to start mongodb... so run the following command in terminal
mongod
#open a second terminal tab
rails new mongo_test --skip-active-record
cd mongo_test
# christmas tree is 7 layers tall
# it is 11 asterix wide
# how many spaces is an asterix? Each asterix is one space
# Special features
# number of rows 1 - 10
# if a tree is 3 rows...
# *
# ***
# *****
# formula for number of asterix.... is ... rows * 2 - 1