sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh
| services: | |
| # ollama and API | |
| ollama: | |
| image: ollama/ollama:latest | |
| container_name: ollama | |
| pull_policy: missing | |
| tty: true | |
| restart: unless-stopped | |
| # Expose Ollama API outside the container stack (but only on the same computer; |
| version: "3.3" | |
| services: | |
| ################################################ | |
| #### Traefik Proxy Setup ##### | |
| ############################################### | |
| traefik: | |
| image: traefik:v2.0 | |
| restart: always |
| // @ts-nocheck TODO: remove at some point | |
| import babel from 'rollup-plugin-babel'; | |
| import commonjs from 'rollup-plugin-commonjs'; | |
| import config from 'sapper/config/rollup.js'; | |
| import getPreprocessor from 'svelte-preprocess' | |
| import path from 'path' | |
| import pkg from './package.json'; | |
| import postcss from 'rollup-plugin-postcss' | |
| import replace from 'rollup-plugin-replace'; |
| import React, {Component} from 'react'; | |
| import{AlertIOS,AppRegistry,Platform,StyleSheet,Text,TouchableOpacity,Button,View,} from 'react-native'; | |
| import Video from 'react-native-video'; | |
| export default class VideoPlayer extends Component { | |
| static navigationOptions = ({ navigation }) =>({header:null}),}); | |
| constructor(props) { | |
| super(props); | |
| this.onLoad = this.onLoad.bind(this); | |
| this.onProgress = this.onProgress.bind(this); | |
| this.onBuffer = this.onBuffer.bind(this); |
| exports.deleteUser = async (req, res, next) { | |
| const session = await mongoose.startSession(); | |
| try { | |
| const { id } = req.params; | |
| // Start session | |
| await session.startTransaction(); | |
| // deleteMany in this session | |
| const [errorOp, result] = await toAll([App.deleteMany({ user: id }).session(session), UserModel.findByIdAndRemove(id).session(session)]); | |
| if (errorOp) { | |
| throw new ErrorRequest(STATUS_CODE.UNPROCESSABLE, errorOp.message); |
| #! /bin/bash | |
| # ECHO COMMAND | |
| # echo Hello World! | |
| # VARIABLES | |
| # Uppercase by convention | |
| # Letters, numbers, underscores | |
| NAME="Bob" | |
| # echo "My name is $NAME" |
| server { | |
| listen 80; | |
| server_name cdn.domain.org; | |
| root /usr/share/nginx/cdn | |
| location / { | |
| proxy_pass http://domain.org; | |
| proxy_set_header Host $host; | |
| proxy_set_header True-Client-IP $remote_addr; |
| import { JWE, JWK, JWS } from 'node-jose' | |
| import fs from 'fs' | |
| import { join } from 'path' | |
| import jwkToPem from 'jwk-to-pem' | |
| import jwt from 'jsonwebtoken' | |
| const certDir = '.cert' | |
| const keystoreFile = join(certDir, 'keystore.json') | |
| const raw = { | |
| iss: 'test', |