SSH into your server at root:
ssh root@myserver.com
Crate a new user:
adduser my_username
Make the new user a sudo user:
// | |
// RefreshableScrollView.swift | |
// -- | |
// | |
// Created by Bradley on 3/24/21. | |
// | |
import Combine | |
import SwiftUI | |
import UIKit |
class UserMediaDetector { | |
// Returns info on all user media devices. | |
async devices() { | |
if (!navigator.mediaDevices || !navigator.mediaDevices.enumerateDevices) { | |
throw(Error("UserMediaDetector getDevices failed: enumerateDevices is not supported")); | |
} | |
const mediaDevices = await navigator.mediaDevices.enumerateDevices(); |
import Combine | |
import Foundation | |
/// AnyPublisher.All | |
/// | |
/// Implementation of `AnyPublisher.all`. Takes an array of `AnyPublisher` | |
/// objects which must all conform to the specified `Output` and `Error` types. | |
/// | |
/// func foo() -> AnyPublisher<Int, Never> { | |
/// return Deferred { |
function angleBetweenPointsInDegrees(x1, y1, x2, y2) { | |
var angle = Math.atan2(y2 - y1, x2 - x1) * 180.0 / Math.PI; | |
angle = 180 + angle; | |
return angle; | |
} | |
function distanceBetweenPoints(x1, y1, x2, y2) { | |
var a = x1 - x2; |
import parseUrl from 'url-parse' | |
/* What's with this file? | |
* | |
* This file is a hacked version of the `getGatsbyImageProps.ts` file provided | |
* by `gatsby-source-sanity` at: | |
* https://github.com/sanity-io/gatsby-source-sanity/blob/main/src/images/getGatsbyImageProps.ts. | |
* | |
* There are existing lacks in functionality at the time of this code being | |
* written that are having detrimental impacts on our ability to get acceptable |
import AWS from "aws-sdk"; | |
import config from "config"; | |
import uuidV4 from "uuid/v4"; | |
import querystring from "querystring"; | |
class RemoteStorageService { | |
constructor() { | |
this._apiVersion = "2011-06-15"; | |
this._s3 = new AWS.S3({ |
class StreamRecording { | |
constructor(stream, mimeTypes = StreamRecording.DefaultMimeTypes) { | |
this._stream = null; | |
this._mimeType = null; | |
this._recordedBlobs = []; | |
this._buildMediaRecorder(stream, mimeTypes); | |
} | |
get stream() { |
// StreamManager | |
// Useful for creating user media streams and tearing them back down. | |
// | |
class StreamManager { | |
constructor() { | |
this._stream = null; | |
this._constraints = null; | |
} | |
get stream() { |