This uses a routes folder to only define the routes, redirects, what data is loaded (useLoader). Other feature specific code would live in a components folder.
routes
├── _auth
│ ├── actions.tsx
│ ├── licenses.tsx
│ ├── login.tsx
│ ├── mfa.tsx
This gist is meant to show my current attempt at saving a Remix form that includes a file. It's a simplified version of the form. The file (an image) should be uploaded to Cloudfront (which then gets sent to an S3 bucket).
// app/routes/settings.tsx - Remix route
import {
unstable_composeUploadHandlers as composeUploadHandlers,
unstable_createMemoryUploadHandler as createMemoryUploadHandler,
unstable_parseMultipartFormData as parseMultipartFormData,
} from "@remix-run/node";| # Git Aliases | |
| alias gl='git pull --prune' | |
| alias rw='checkout -' | |
| alias co='checkout' | |
| alias ci='commit' | |
| alias st='status' |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>| // FILE #1: app/utils/session.ts | |
| import jwt from 'jsonwebtoken'; | |
| import { redirect } from 'remix'; | |
| export function requireValidSession(request: Request) { | |
| // assuming key is stored as base64 | |
| // if not, no need for this line, just use env var directly | |
| const publicKey = Buffer.from(process.env.JWT_PUBLIC_KEY || '', 'base64').toString('ascii'); | |
| const tokenName = process.env.USERFRONT_TOKEN_NAME || ''; |
DON'T USE THIS YET - WORK IN PROGRESS
I've recently been trying out Electron.js for a number of new projects and it's so great to work with. It's useful for building desktop applications as advertised, but also for applications running in kiosk mode, such as an ATM screen or embedded GUI. The development of an Electron application is outside the scope of this article, but I'm mentioning it because that process outputted the .deb file that I'll using in this article.
So what is a PPA? PPA stands for Personal Package Archive and it's a way for developers to create source packages for Ubuntu that can be built and published as an apt repository. When you add your repository to your sources list, Ubuntu can perform updates just like any other Ubuntu package. If any of this sounds like a foreign language, I recommend reading this PPA Guide.
First you'll want to update your ins
| <!doctype html> | |
| <html> | |
| <head> | |
| <title>My Cookie Recipe</title> | |
| <meta charset="utf-8" /> | |
| </head> | |
| <body> | |
| <h1>Best Chocolate Chip Recipe</h1> | |
| <ul> | |
| <li>1 cup butter, softened</li> |
| #!/bin/bash | |
| set -e | |
| echo "Enter the robot's serial number (ex. FX250123)" | |
| read ROBOT_SN | |
| if [ -z $ROBOT_SN ] | |
| then | |
| echo "A robot serial number is required." | |
| exit |
Thanks everyone for commenting/contributing! I made this in college for a class and I no longer really use the technology. I encourage you all to help each other, but I probably won't be answering questions anymore.
This article is also on my blog, too.
Note: $ denotes the start of a command. Don't actually type this.
x86_64.sh. If I had a 32-bit computer, I'd select the x86.sh version. If you accidentally try to install the wrong one, you'll get a warning in the terminal. I chose `Ana