This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::io::prelude::*; | |
use std::net::{TcpListener, TcpStream}; | |
fn main() { | |
let listener = TcpListener::bind("127.0.0.1:80").unwrap(); | |
for stream in listener.incoming() { | |
match stream { | |
Ok(stream) => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /pi_piper/sysfs/driver.rb | |
module PiPiper | |
module Sysfs | |
class Driver < PiPiper::Driver | |
def initialize | |
# do stuff | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# File: .platform/hooks/prebuild/01_install_yarn.sh | |
# https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/platforms-linux-extend.html | |
# With Amazon Linux 2, installation scripts on the EC2 hosts are run through | |
# platform hooks. This script will execute within the prebuild step which occurs | |
# in the staging path. | |
# Make sure that this file has executable permissions (chmod +x) | |
echo "Installing NodeJS and Yarn" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Used as the base secret for all MessageVerifiers in Rails, including the one protecting cookies. | |
secret_key_base: "key generated from <rails secret>" | |
production: | |
database_username: username | |
database_password: password |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This file is automatically compiled by Webpack, along with any other files | |
// present in this directory. You're encouraged to place your actual application logic in | |
// a relevant structure within app/javascript and only use these pack files to reference | |
// that code so it'll be compiled. | |
require("@rails/ujs").start() | |
require("turbolinks").start() | |
require("@rails/activestorage").start() | |
require("channels") | |
require("jquery") // Optional, pulling this in for Bootstrap 4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Make sure RUBY_VERSION matches the Ruby version in .ruby-version and Gemfile | |
ARG RUBY_VERSION=3.2.2 | |
FROM registry.docker.com/library/ruby:$RUBY_VERSION-slim as base | |
# Rails app lives here | |
WORKDIR /rails | |
# Set production environment | |
ENV RAILS_ENV="production" \ | |
BUNDLE_DEPLOYMENT="1" \ |