cd into your react app and do the following:
npm run build
cd build/
mv index.html 200.html
npx surge| const ugly = | |
| (x) => true | |
| console.log(ugly( | |
| { | |
| name: 'sweater', | |
| type: 'xmas' | |
| } | |
| ) ? | |
| 'UGLY XMAS SWEATER' | 
cd into your react app and do the following:
npm run build
cd build/
mv index.html 200.html
npx surge| ``` | |
| brew uninstall ruby | |
| \curl -sSL https://get.rvm.io | bash -s stable --ruby | |
| rvm install ruby-2.4 | |
| rvm use ruby-2.4 | |
| gem install bundler | |
| bundle install | |
| ``` | 
| { | |
| "workshops":[ | |
| { | |
| "title":"INTRO TO PYTHON", | |
| "description":"Explore the intersection of coding and data with General Assembly. During our Python-focused intro class, you’ll learn you’ll learn all about Python - including how to get started, advantages and disadvantages of Python, essentials of programming in Python, and tools available to build applications in Python.", | |
| "instructor":"Terence Stone", | |
| "date":"Monday, 4 February", | |
| "time":"6:30 – 8:30 pm EST" | |
| }, | |
| { | 
| // Load HTTP module | |
| const http = require("http"); | |
| // Create HTTP server and listen on port 8000 for requests | |
| http.createServer(function(request, response) { | |
| // Set the response HTTP header with HTTP status and Content type | |
| response.writeHead(200, {'Content-Type': 'text/plain'}); | |
| // Send the response body "Hello World" | 
| def check_for_existing_membership | |
| accounts = Account.where(email_address: email) | |
| accounts.each do |account| | |
| if account.portals.pluck(:id) == portal.id | |
| errors.add(:duplicate, 'The email is already associated with members of this organization') | |
| return false | |
| end | |
| end | |
| function adjacentElementsProduct(inputArray) { | |
| let previousElement; | |
| let largestProduct = inputArray[0]*inputArray[1]; | |
| inputArray.forEach(function(currentElement, index){ | |
| if (index === 0) { | |
| previousElement = currentElement; | |
| return; | |
| } | |
| else if (previousElement*currentElement > largestProduct) { | |
| largestProduct = previousElement*currentElement | 
GitHub Hosting - the -poor +rich man's hosting provider.
| namespace :populate do | |
| desc "Populate data from Foursqaure API" | |
| task :foursquare => :environment do | |
| client = Foursquare2::Client.new(:client_id => 'CLIENT_ID', :client_secret => 'CLIENT_SECRET', :api_version => '20140904') | |
| Cities.data_path = "lib/tasks/cities" | |
| cities = Cities.cities_in_country('US') | |
| limit = 5000 # Foursqaure rate limit up to 5,000 userless requests per hour to venues/* endpoints. | 
| def change_due(input) | |
| quarters= (input/25) | |
| dimes=((input%25)/10) | |
| nickles=(((input%25)%10)/5) | |
| pennies=(input%5) | |
| puts "#{quarters} quarters, #{dimes} dimes, #{nickles} nickles, and #{pennies} pennies" | |
| end |