Skip to content

Instantly share code, notes, and snippets.

View conoro's full-sized avatar

Conor O'Neill conoro

View GitHub Profile
@jart
jart / rename-pictures.sh
Created December 12, 2023 15:24
Shell script for renaming all images in a folder
#!/bin/sh
# rename-pictures.sh
# Author: Justine Tunney <jtunney@gmail.com>
# License: Apache 2.0
#
# This shell script can be used to ensure all the images in a folder
# have good descriptive filenames that are written in English. It's
# based on the Mistral 7b and LLaVA v1.5 models.
#
# For example, the following command:
@adrienbrault
adrienbrault / llama2-mac-gpu.sh
Last active August 15, 2024 07:10
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
import network
import socket
import time
import struct
from machine import Pin
NTP_DELTA = 2208988800
host = "pool.ntp.org"
@sandyjmacdonald
sandyjmacdonald / WIFI_CONFIG.py
Last active July 3, 2022 10:40
An example of simple API to set the colour of the Pimoroni Inventor 2040's LEDs
SSID = ""
PSK = ""
@ritchieking
ritchieking / sqlcsv.sh
Created June 21, 2022 18:06
Wrapper for using SQLite on CSV files
sqlcsv() {
if [ $# -lt 2 ]
then
echo "USAGE: sqlcsv [filename.csv] [SQL]"
echo "In the SQL, refer to the data sourse as [filename]"
else
filename="$1"
dataname=${filename%????}
sqlite3 :memory: -cmd '.mode csv' -cmd ".import $filename $dataname" -cmd '.mode markdown' $2
fi
@joelonsql
joelonsql / PostgreSQL-EXTENSIONs.md
Last active September 18, 2024 02:10
1000+ PostgreSQL EXTENSIONs

🗺🐘 1000+ PostgreSQL EXTENSIONs

This is a list of URLs to PostgreSQL EXTENSION repos, listed in alphabetical order of parent repo, with active forks listed under each parent.

⭐️ >= 10 stars
⭐️⭐️ >= 100 stars
⭐️⭐️⭐️ >= 1000 stars
Numbers of stars might not be up-to-date.

@edvinasbartkus
edvinasbartkus / bypass.js
Last active October 15, 2023 13:18
bypass paywall for sites like ft.com. Important: IT WILL REMOVE COOKIES (you will be logged out) AND WILL REMOVE LOCATION/SESSION STORAGE
javascript:localStorage.clear();sessionStorage.clear();(function(){var cookies=document.cookie.split("; ");for(var c=0;c<cookies.length;c+=1){var d=window.location.hostname.split(".");while(d.length>0){var cookieBase=encodeURIComponent(cookies[c].split(";")[0].split("=")[0])+'=; expires=Thu, 01-Jan-1970 00:00:01 GMT; domain='+d.join('.')+' ;path=';var p=location.pathname.split('/');document.cookie=cookieBase+'/';while(p.length>0){document.cookie=cookieBase+p.join('/');p.pop()};d.shift()}}})();window.location="https://facebook.com/l.php?u="+encodeURIComponent(window.location.href)
@IanColdwater
IanColdwater / twittermute.txt
Last active September 2, 2024 06:19
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
global presenterNotes
tell application "Keynote"
activate
open (choose file)
tell front document
do shell script "rm -f ~/keynote-notes.txt"
set num to 0
repeat with aSlide in every slide
set num to num + 1
do shell script "echo '-- " & num & " --' >> ~/keynote-notes.txt"