Skip to content

Instantly share code, notes, and snippets.

View cshen's full-sized avatar
💭
I may be slow to respond.

C Shen cshen

💭
I may be slow to respond.
View GitHub Profile
@cshen
cshen / iTerm2-Ollama-Integration.md
Created October 21, 2024 06:41 — forked from soham2008xyz/iTerm2-Ollama-Integration.md
iTerm2 Ollama Integration

iTerm2 Ollama Integration

A guide on using Ollama as the OpenAI API provider for inline completions in iTerm2.

Configuration

  • API URL: http://127.0.0.1:11434/v1/completions
  • Model: mistral
  • Tokens: 4000
  • Use legacy completions API: true
@cshen
cshen / pass.md
Created October 13, 2024 13:47 — forked from abtrout/pass.md
Using password-store with git repository synching

Password-store keeps your passwords (or any other sensitive information) saved in GnuPG encrypted files organized in ~/.password-store. For more information about GPG, consult the GNU Privacy Handbook.

Getting started

To get started, install pass and generate a keypair.

$ brew install pass
$ gpg --gen-key
$ gpg --list-keys

Running emscripten on OS X

There are a number of additional dependencies required for getting things installed on OS X. Starting with a blank slate OS X machine, this is the process it takes:

# Install Xcode Command Line Tools

# Install Homebrew
ruby -e "$(curl -fsSkL raw.github.com/mxcl/homebrew/go)"
@cshen
cshen / slides.md
Created September 11, 2013 16:44 — forked from aaronwolen/slides.md

% Title % Name % Date

My first slide

List

@cshen
cshen / remgit.sh
Created September 7, 2013 03:03 — forked from ckalima/remgit.sh
# remgit.sh
# Creates a remote git repository from the current local directory
# Configuration
# Replace SSH_USERNAME, SSH_HOST, SSH_GIT_PATH with your details
USER=SSH_USERNAME
HOST=SSH_HOST
GIT_PATH=SSH_GIT_PATH
REPO=${PWD##*/}
/**
The following example uses this function to calculate the matrix-vector product using
a blas/lapack routine:
/ 3 1 3 \ / -1 \
| 1 5 9 | * | -1 |.
\ 2 6 5 / \ 1 /
D2 version based on the C version at http://www.seehuhn.de/pages/linear
"""
cymex.pyx
=========
This file shows how to bootstrap a C extension for MATLAB with just Cython,
and no C stubs. This strategy probably would work for extending other
languages as well, with C/Python.
It is necessary to redirect MATLAB's libgfortran link as found in
$MATLAB/sys/os/glnxa64/libgfortran.so.3 to the one to which your NumPy's