ld: library not found for -lgcc_s.10.4
brew reinstall libffi
export LDFLAGS="-L/usr/local/opt/libffi/lib"
export PKG_CONFIG_PATH="/usr/local/opt/libffi/lib/pkgconfig"
bundle install
# This is an example of the the Fluent Interface Pattern | |
class ShoppingCart | |
attr_reader :items | |
def initialize | |
@items = [] | |
end | |
def add_item(item) |
#!/bin/bash | |
# Usage: | |
# ~/bin/ai <<< "Why is the sky blue?" | |
# ls -l | ~/bin/ai "Which files listed above have symlinks?" | |
context_size=4000 | |
n_predict=2000 | |
temperature=0.5 | |
prompt_prefix="\\nUSER: " |
#!/bin/bash | |
# Script: ~/bin/tmai | |
# | |
# Helper script for tmux llama.cpp integration | |
# | |
# Usage: | |
# - Optionally set the PROMPT_FILE envvar, containing the full path to a text file containing the system prompt | |
# - While in an active tmux session, press: CTRL-B x | |
# - Enter your prompt and press Enter |
ssh-keygen -y -f $PRIVATEKEY > $PRIVATEKEY.pub |
ld: library not found for -lgcc_s.10.4
brew reinstall libffi
export LDFLAGS="-L/usr/local/opt/libffi/lib"
export PKG_CONFIG_PATH="/usr/local/opt/libffi/lib/pkgconfig"
bundle install
convert favicon.png -define icon:auto-resize=64,48,32,16 favicon.ico |
# Remote | |
cat <file_name> | gpg -ac -o- | curl -X PUT -T "-" https://transfer.sh/<file_name>.gpg | |
# Local | |
curl https://transfer.sh/<hash>/<file_name>.gpg | gpg -o- > <file_name> |
openssl x509 -inform der -in certificate.cer -out certificate.pem |
#!/bin/bash | |
[ ! -d out ] && mkdir out | |
for img in "$@"; do \ | |
img_width="$(identify -format %w $img)"; \ | |
img_height="$(identify -format %h $img)"; \ | |
label_height=$(bc -l <<< "$img_height/50"); \ | |
img_date=$(stat -l -t "%F" $img | awk '{print $6}'); \ | |
convert -background '#0008' -fill white -gravity center -size ${img_width}x$label_height \ |
#!/bin/bash | |
echo "* Updating transmission blocklist" | |
BLOCKLIST_DIR=/var/lib/transmission-daemon/info/blocklists | |
#wget -q -O- http://www.bluetack.co.uk/config/level{1,2,3}.gz | \ | |
# gunzip -c > ${BLOCKLIST_DIR}/level123 && \ | |
cd $BLOCKLIST_DIR | |
wget -qO level1.gz http://list.iblocklist.com/?list=bt_level1&fileformat=p2p&archiveformat=gz&username=XXXX&pin=XXXX | |
wget -qO level2.gz http://list.iblocklist.com/?list=bt_level2&fileformat=p2p&archiveformat=gz&username=XXXX&pin=XXXX | |
wget -qO level3.gz http://list.iblocklist.com/?list=bt_level3&fileformat=p2p&archiveformat=gz&username=XXXX&pin=XXXX |