Skip to content

Instantly share code, notes, and snippets.

@adrienbrault
adrienbrault / llama2-mac-gpu.sh
Last active July 1, 2024 05:32
Run Llama-2-13B-chat locally on your M1/M2 Mac with GPU inference. Uses 10GB RAM. UPDATE: see https://twitter.com/simonw/status/1691495807319674880?s=20
# Clone llama.cpp
git clone https://github.com/ggerganov/llama.cpp.git
cd llama.cpp
# Build it
make clean
LLAMA_METAL=1 make
# Download model
export MODEL=llama-2-13b-chat.ggmlv3.q4_0.bin
@cjxe
cjxe / 1.md
Last active July 15, 2024 07:26
🍎 MacOS apps that I use regularly

⚠️ DISCLAIMER

My general thumb of rule to download a new tool is to wait until I Google a tool to solve a problem, and then integrate it into my workflow. So download the tools which you think are useful to your workflow.

Productivity

@devvyn
devvyn / -chess-sandbox.ipynb
Last active November 17, 2021 23:20
chess-sandbox.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ryanpedersen42
ryanpedersen42 / config.yml
Last active May 8, 2024 13:00
Path filtering example
version: 2.1
setup: true
orbs:
path-filtering: circleci/path-filtering@0.0.2
workflows:
setup-workflow:
jobs:
@prologic
prologic / LearnGoIn5mins.md
Last active July 3, 2024 04:05
Learn Go in ~5mins
@noamtamim
noamtamim / README.md
Last active July 9, 2024 08:45
Markdown with PlantUML

How to use PlantUML with Markdown

PlantUML is a really awesome way to create diagrams by writing code instead of drawing and dragging visual elements. Markdown is a really nice documentation tool.

Here's how I combine the two, to create docs with embedded diagrams.

Step 0: Setup

Get the command-line PlantUML from the download page or your relevant package manager.

@Bajena
Bajena / config.yml
Created July 22, 2018 11:09
Build + deploy Google Data Studio connector in CircleCI
# Javascript Node CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
#
version: 2
jobs:
build:
docker:
- image: circleci/node:7.10
@guizmaii
guizmaii / aws_postgresql_max_connection.md
Last active July 11, 2024 08:07
AWS PostgreSQL max_connection per instance type

The default formula use by AWS RDS to calculate the max_connections parameter is: LEAST({DBInstanceClassMemory/9531392},5000)

But It's hard to find the exact value of DBInstanceClassMemory.

So, here are the values I got when I ran the SQL commmand: show max_connections; in some RDS instances:

Instance type RAM (GB) max_connections
db.t2.small 2 198
db.t2.medium 4 413
@vielhuber
vielhuber / script.sh
Last active July 13, 2024 02:21
PostgreSQL: Backup and restore export import pg_dump with password on command line #sql
# best practice: linux
nano ~/.pgpass
*:5432:*:username:password
chmod 0600 ~/.pgpass
# best practice: windows
edit %APPDATA%\postgresql\pgpass.conf
*:5432:*:username:password
# linux