Name a value.
color = "red"| # Description | |
| # Translate erb (html) into a slim version | |
| # | |
| # Commands | |
| # learnbot erb2slim <your code here> | |
| # | |
| # Authors: | |
| # Aeshta and Rosiene | |
| module.exports = (robot) -> |
| #!/usr/bin/env ruby | |
| require 'net/http' | |
| require 'json' | |
| class Search | |
| TOPICS = ["Day 1 - Frontend", "Day 2 - Basic Programming", "Day 3 - Loops & Breaks", "Day 4 - OOP", "Day 5 - Intro to Web with Sinatra & Git", "Day 6 - Intro to Ruby on Rails", "Day 7 - Hackathon I", "Day 08 - Rails, Deployment, Pull requests, Code review", "Day 09 - ActiveRecord", "Day 10 - Rails Testing with RSpec", "Day 11 - Users with Devise & Authorization with CanCan(Can)", "Day 12 - File uploads with Carrierwave", "Day 13 - Javascript 1", "Day 14 - SQL and Relations", "Day 15 - Javascript 2 & JQuery", "Day 16 - AJAX & REST", "Day 17 - Integration testing", "Day 18", "Day 19", "Day 20", "Day 21", "Day 22", "Day 23 - Javascript 3", "Day 24 - React 1", "Day 25 - React 2", "Day 26 - React 3", "Day 27 - Testing with Enzyme", "Day 28. FeathersJS", "Advanced Session :: Introduction to d3", "Advanced Session :: Introduction to Docker", "Advanced Session :: Redux", "Advanced Session :: Styling with Sass", "Codaisseur Cloud", "Git & Github", |
| 'use strict'; | |
| // force a specific Host header to be sent to the origin | |
| exports.handler = (event, context, callback) => { | |
| const request = event.Records[0].cf.request; | |
| request.headers.host[0].value = 'jobs.mycompany.com'; | |
| return callback(null, request); | |
| }; |
| const byte rgb_8_r = 13; | |
| const byte rgb_8_b = 15; | |
| const byte rgb_8_g = 2; | |
| const byte rgb_7_r = 0; | |
| const byte rgb_7_b = 4; | |
| const byte rgb_7_g = 16; | |
| const byte rgb_6_r = 17; | |
| const byte rgb_6_b = 5; | |
| const byte rgb_6_g = 18; | |
| const byte rgb_5_r = 23; |
Sure! Below is a Rust program that acts as a reverse proxy in front of a website, supports WebSockets, and serves static files. We'll use the warp framework, which is a powerful and easy-to-use web framework for Rust.
First, create a new Rust project:
cargo new reverse_proxy