Skip to content

Instantly share code, notes, and snippets.

View csaroff's full-sized avatar

Chaskin Saroff csaroff

  • San Bruno, CA
View GitHub Profile
@csaroff
csaroff / flollama.sh
Last active September 4, 2024 07:17
A script to deploy ollama to fly.io
#!/bin/bash
# Variables
APP_NAME="<name>" # Replace <name> with your desired app name
VOLUME_NAME="ollama"
IMAGE_NAME="ollama/ollama"
INTERNAL_PORT=11434
VM_SIZE="shared-cpu-8x"
MOUNT_POINT="/mnt/ollama/models"
ENV_VARIABLES="OLLAMA_MODELS=$MOUNT_POINT"
@csaroff
csaroff / mysql_to_big_query.sh
Created September 25, 2020 09:37 — forked from shantanuo/mysql_to_big_query.sh
Copy MySQL table to big query. If you need to copy all tables, use the loop given at the end. Exit with error code 3 if blob or text columns are found. The csv files are first copied to google cloud before being imported to big query.
#!/bin/sh
TABLE_SCHEMA=$1
TABLE_NAME=$2
mytime=`date '+%y%m%d%H%M'`
hostname=`hostname | tr 'A-Z' 'a-z'`
file_prefix="trimax$TABLE_NAME$mytime$TABLE_SCHEMA"
bucket_name=$file_prefix
splitat="4000000000"
bulkfiles=200