Skip to content

Instantly share code, notes, and snippets.

@mchiang0610
mchiang0610 / ollama.txt
Last active May 5, 2024 20:34
ollama run models - august 10 2023
codeup:13b
codeup:13b-llama2
codeup:13b-llama2-chat
codeup:13b-llama2-chat-q2_K
codeup:13b-llama2-chat-q3_K_L
codeup:13b-llama2-chat-q3_K_M
codeup:13b-llama2-chat-q3_K_S
codeup:13b-llama2-chat-q4_0
codeup:13b-llama2-chat-q4_1
codeup:13b-llama2-chat-q4_K_M
@kepano
kepano / obsidian-web-clipper.js
Last active May 5, 2024 20:31
Obsidian Web Clipper Bookmarklet to save articles and pages from the web (for Safari, Chrome, Firefox, and mobile browsers)
javascript: Promise.all([import('https://unpkg.com/turndown@6.0.0?module'), import('https://unpkg.com/@tehshrike/readability@0.2.0'), ]).then(async ([{
default: Turndown
}, {
default: Readability
}]) => {
/* Optional vault name */
const vault = "";
/* Optional folder name such as "Clippings/" */
@Prottoy2938
Prottoy2938 / Dijkstra's-algorithm.js
Created March 18, 2020 10:02
Dijkstra's algorithm implementation in JavaScript
//Dijkstra algorithm is used to find the shortest distance between two nodes inside a valid weighted graph. Often used in Google Maps, Network Router etc.
//helper class for PriorityQueue
class Node {
constructor(val, priority) {
this.val = val;
this.priority = priority;
}
}
<?
# MIT license, do whatever you want with it
#
# This is my invoice.php page which I use to make invoices that customers want,
# with their address on it and which are easily printable. I love Stripe but
# their invoices and receipts were too wild for my customers on Remote OK
#
require_once(__DIR__.'/../vendor/autoload.php');
@dansp89
dansp89 / 000-readme.me
Last active May 5, 2024 20:28
STRAPI 4 - Add custom routes and also add to the SWAGGER documentation.
> With this code, you can add your custom routes in swagger, read the documentation if you have any further questions.
## Tested on:
1. Node 18.17.1
1. Strapi 4.15.5
1. Language: Typescript
@ChuckMichael
ChuckMichael / vcredistr.md
Last active May 5, 2024 20:26
Visual C++ Redistributable Packages
/**
* Coax an LLM into generated grounded JSON based on key/value-level perplexity checks with a custom
* `yup` validation test for perplexity, model fallbacks, and a customizable failure injection callback
* to inject grounding instructions on request for exact paths (e.g. for specific keys, if perplexity too high).
*
* Contributing to the community as an example of how to coax an LLM into generating JSON that conforms
* to a schema with key-level perplexity checks and fallback models for retries.
*
* Write up at: https://dev.to/josiahbryan/tackling-json-perplexity-in-llm-outputs-a-weekend-project-jm8
*
@stevendesu
stevendesu / HMAC.js
Created April 30, 2020 16:18
A simple, open-source, HMAC-SHA256 implementation in pure JavaScript. Designed for efficient minification.
// To ensure cross-browser support even without a proper SubtleCrypto
// impelmentation (or without access to the impelmentation, as is the case with
// Chrome loaded over HTTP instead of HTTPS), this library can create SHA-256
// HMAC signatures using nothing but raw JavaScript
/* eslint-disable no-magic-numbers, id-length, no-param-reassign, new-cap */
// By giving internal functions names that we can mangle, future calls to
// them are reduced to a single byte (minor space savings in minified file)
var uint8Array = Uint8Array;
@sekcompsci
sekcompsci / Comparison Espressif ESP MCUs.md
Created June 18, 2021 03:56 — forked from fabianoriccardi/Comparison Espressif ESP MCUs.md
Comparison table for ESP8266/ESP32/ESP32-S2/ESP32-S3/ESP32-C3/ESP32-C6

Comparison table for ESP8266/ESP32/ESP32-S2/ESP32-S3/ESP32-C3/ESP32-C6

A minimal table to compare the Espressif's MCU families.

ESP8266 ESP32 ESP32-S2 ESP32-S3 ESP32-C3 ESP32-C6
Announcement Date 2014, August 2016, September 2019, September 2020, December
@ssddanbrown
ssddanbrown / bookstack-backup.sh
Last active May 5, 2024 20:25
bookstack-backup
#!/bin/bash
# Directory to store backups within
# Should not end with a slash and not be stored within
# the BookStack directory
BACKUP_ROOT_DIR="$HOME"
# Directory of the BookStack install
# Should not end with a slash.
BOOKSTACK_DIR="/var/www/bookstack"