A guide on using Ollama as the OpenAI API provider for inline completions in iTerm2.
- API URL:
http://127.0.0.1:11434/v1/completions
- Model:
mistral
- Tokens:
4000
- Use legacy completions API:
true
This is a living document. Everything in this document is made in good faith of being accurate, but like I just said; we don't yet know everything about what's going on.
Update: I've disabled comments as of 2025-01-26 to avoid everyone having notifications for something a year on if someone wants to suggest a correction. Folks are free to email to suggest corrections still, of course.
#!/usr/bin/env python3 | |
# python3 update of https://gist.github.com/dergachev/7028596 | |
# Create a basic certificate using openssl: | |
# openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes | |
# Or to set CN, SAN and/or create a cert signed by your own root CA: https://thegreycorner.com/pentesting_stuff/writeups/selfsignedcert.html | |
import http.server | |
import ssl | |
httpd = http.server.HTTPServer(('127.0.0.1', 443), http.server.SimpleHTTPRequestHandler) |
#!python3 | |
''' | |
Directions: | |
- install yt-dlp via Pip (e.g. using (StaSh)[https://github.com/ywangd/stash] - `pip install yt-dlp`) | |
- add this script as a Share extension through Settings -> Share Extension Shortcuts | |
- while watching a video in the YouTube site or app, just share the video to Pythonista and select this script | |
- the video will download, and when it's done you can share the video file itself with any app (e.g. VLC) | |
Advanced usage: |
# BetterTouchTool reset trial time | |
# ** All preference will reset | |
echo "remove ~/Library/Preferences/com.hegenberg.BetterTouchTool.plist" | |
rm -rf ~/Library/Preferences/com.hegenberg.BetterTouchTool.plist | |
echo "Done" | |
echo "remove ~/Library/Application\ Support/BetterTouchTool/" | |
rm -rf ~/Library/Application\ Support/BetterTouchTool/ | |
echo "Done" |
#!/bin/bash | |
set -eu | |
URL=$1 | |
echo "super go bustering for super brute: $URL" | |
gobuster -u $URL -l -s 200,204,301,302,307,403 -w /root/tools/SecLists/Discovery/Web_Content/tomcat.txt | |
gobuster -u $URL -l -s 200,204,301,302,307,403 -w /root/tools/SecLists/Discovery/Web_Content/nginx.txt | |
gobuster -u $URL -l -s 200,204,301,302,307,403 -w /root/tools/SecLists/Discovery/Web_Content/apache.txt |
😒🙅🙄 | |
$thing for fun and profit | |
all your $thing are belong to $shutup | |
honey I $verbed the $thing | |
$thing demystified | |
$thing: a deep dive | |
$verb all the things | |
make $thing great again | |
$x and $y and $z, oh my! |
#!/usr/bin/python3 | |
import math | |
f = open("rawdump.txt", "r") | |
for l in f.readlines(): | |
p = 0 | |
chars = [] | |
chksum = 0 |