Skip to content

Instantly share code, notes, and snippets.

View SeanMcP's full-sized avatar

Sean McPherson SeanMcP

View GitHub Profile
@jrknox1977
jrknox1977 / ollama_dspy.py
Created February 9, 2024 18:06
ollama+DSPy using OpenAI APIs.
# install DSPy: pip install dspy
import dspy
# Ollam is now compatible with OpenAI APIs
#
# To get this to work you must include `model_type='chat'` in the `dspy.OpenAI` call.
# If you do not include this you will get an error.
#
# I have also found that `stop='\n\n'` is required to get the model to stop generating text after the ansewr is complete.
# At least with mistral.
@dev-sampsonorson
dev-sampsonorson / enable-pre-post-in-pnpm.md
Created February 28, 2022 16:27
Enabling pre and post hooks in pnpm

Enabling pre and post hooks in pnpm

.npmrc option

enable-pre-post-scripts = true

Command line option

pnpm config set enable-pre-post-scripts true

@MikeRawding
MikeRawding / spacebar-ptt.user.js
Last active March 9, 2021 19:33
Tampermonkey script to add PTT to google meet.
// ==UserScript==
// @name Google Meet Spacebar PTT
// @namespace https://github.com/mikerawding
// @version 0.1
// @description Use Spacebar as Push-To-Talk for Google Meet
// @author Mike Rawding
// @match https://meet.google.com/*
// @grant none
// ==/UserScript==
@SeanMcP
SeanMcP / bash.sh
Last active August 28, 2019 15:33
Zip a directory for Chrome Web Store
zip -r popsicle-sticks-mini.zip popsicle-sticks-mini -x "*.DS_Store" "*.svg" \*.git\* "*README.md" \*src/img/cws\*
@jwilson8767
jwilson8767 / es6-element-ready.js
Last active April 22, 2024 20:28
Wait for an element to exist. ES6, Promise, MutationObserver
// MIT Licensed
// Author: jwilson8767
/**
* Waits for an element satisfying selector to exist, then resolves promise with the element.
* Useful for resolving race conditions.
*
* @param selector
* @returns {Promise}
*/
@subfuzion
subfuzion / curl.md
Last active May 3, 2024 09:26
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@lmarkus
lmarkus / README.MD
Last active May 2, 2024 09:21
Extracting / Exporting custom emoji from Slack

Extracting Emoji From Slack!

Slack doesn't provide an easy way to extract custom emoji from a team. (Especially teams with thousands of custom emoji) This Gist walks you through a relatively simple approach to get your emoji out.

If you're an admin of your own team, you can get the list of emoji directly using this API: https://api.slack.com/methods/emoji.list. Once you have it, skip to Step 3

HOWEVER! This gist is intended for people who don't have admin access, nor access tokens for using that list.

Follow along...

@PurpleBooth
PurpleBooth / README-Template.md
Last active May 3, 2024 18:53
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites