A guide on using Ollama as the OpenAI API provider for inline completions in iTerm2.
- API URL:
http://127.0.0.1:11434/v1/completions - Model:
mistral - Tokens:
4000 - Use legacy completions API:
true
| FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.16 as builder | |
| ARG TARGETPLATFORM | |
| ARG BUILDPLATFORM | |
| ARG TARGETOS | |
| ARG TARGETARCH | |
| WORKDIR /app/ | |
| ADD . . | |
| RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -ldflags="-w -s" -o yourapplication main.go |
| #!/usr/bin/perl | |
| # | |
| # @file | |
| # Converter tool, from Apache Common Log file to CSV. | |
| # | |
| # All code is released under the GNU General Public License. | |
| # See COPYRIGHT.txt and LICENSE.txt. | |
| # | |
| #!/usr/bin/env bash | |
| # script was taken from https://gist.github.com/innovia/fbba8259042f71db98ea8d4ad19bd708 and adjusted with "apply_rbac" function and colorized output | |
| set -e | |
| set -o pipefail | |
| # Colors | |
| RED="\e[01;31m" |
| --- | |
| version: '2' | |
| services: | |
| zk1: | |
| image: confluentinc/cp-zookeeper:3.0.1 | |
| ports: | |
| - "22181:22181" | |
| environment: | |
| ZOOKEEPER_SERVER_ID: 1 | |
| ZOOKEEPER_CLIENT_PORT: 22181 |
| #!/bin/sh -- | |
| # Make executable and Run in directory containing files? | |
| # Convert all '.ts' files in directory using ffmpeg using nvidia hardware hevc(x265) encoding, maintain orginal audio | |
| # and extract subtitles/closed-caption as '.srt' to current directory. | |
| # Start looping over files, tell what we do and log any output to screen and log. | |
| for MPEG in *.ts; do echo "Starting ${MPEG}" | |
| ffmpeg -i "${MPEG}" -c:a copy -c:v hevc_nvenc -b:v 3000k -minrate 1000k -maxrate 8000k -level 4.1 -tag:v hvc1 -preset slow -rc-lookahead 32 -movflags faststart "${MPEG%.ts}.mp4" 2>&1 | tee -a "conversion.log" | |
| # If ffmpeg exited OK, then say it and move the original to the backup directory. | |
| if [ $? -eq 0 ]; then |
| package main | |
| import ( | |
| "encoding/json" | |
| "fmt" | |
| "net/http" | |
| "time" | |
| "github.com/hashicorp/vault/api" | |
| "github.com/hashicorp/vault/builtin/credential/aws" |
| # maximum capability of system | |
| user@ubuntu:~$ cat /proc/sys/fs/file-max | |
| 708444 | |
| # available limit | |
| user@ubuntu:~$ ulimit -n | |
| 1024 | |
| # To increase the available limit to say 200000 | |
| user@ubuntu:~$ sudo vim /etc/sysctl.conf |
| AWSTemplateFormatVersion: '2010-09-09' | |
| Transform: AWS::Serverless-2016-10-31 | |
| Resources: | |
| Function: | |
| Type: AWS::Serverless::Function | |
| Properties: | |
| Handler: handler.Handle | |
| Runtime: python2.7 | |
| CodeUri: ../cloudbookmarks.zip | |
| Events: |