Skip to content

Instantly share code, notes, and snippets.

View iguatemigarin's full-sized avatar

Iguatemi Canfield Garin iguatemigarin

View GitHub Profile
#!/bin/bash
# Translator CLI Wrapper Script
# This script manages the installation, updating, and execution of the @mirohq-internal/translation-cli package.
# It provides a wrapper around the translator command, handling automatic updates and configuration management.
PACKAGE="{PACKAGE}"
COMMAND_NAME="{COMMAND}"
CONFIG_DIR="$HOME/.config/$COMMAND_NAME"
TIMESTAMP_FILE="$CONFIG_DIR/last_update"
  1. Install ollama

    brew install ollama
  2. Start ollama

    We'll start ollama using the server mode, this way we have an HTTP interface ready to be consumed by whoever wants.

@iguatemigarin
iguatemigarin / gci
Created July 5, 2024 11:57
Git Checkout Interactive
#!/bin/bash
set -e
# Color definitions
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[0;33m'
BLUE='\033[0;34m'
MAGENTA='\033[0;35m'
#!/usr/bin/env python3
import os
import argparse
import sys
import subprocess
from pathlib import Path
def get_git_root(path):
try:
Function Paket-Init {
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
New-Item -ItemType Directory -Force -Path ".\.paket"
iwr (iwr http://fsprojects.github.io/Paket/stable).ToString() -OutFile ".\.paket\paket.exe"
Set-Content -Value ".paket\paket.exe %*" -Path ".\paket.cmd"
.\paket.cmd init
}
Invoke-WebRequest "https://gist.githubusercontent.com/iguatemigarin/3ffd3276a6870133b910b0ad5875b209/raw/1f803d47688ae3437072ad15e4838d9e3ef5a2e6/paket-init.fsx" -OutFile init-paket.fsx
fsi.exe .\init-paket.fsx
Remove-Item .\init-paket.fsx
.\paket.cmd init
open System
open System.IO
Environment.CurrentDirectory <- __SOURCE_DIRECTORY__
if not (Directory.Exists ".paket") then
Directory.CreateDirectory ".paket" |> ignore
if not (File.Exists ".paket\\paket.exe") then
let url = "http://fsprojects.github.io/Paket/stable"