ASAHIネットがDS-Lite対応したので、 自宅の適当なLinuxルーターにて設定しようとして詰まったAFTR取得に関するメモ。
Linuxルーターを使ってる人向けのニッチなものだけど、情報として残しておく。
ASAHIネットがDS-Lite対応したので、 自宅の適当なLinuxルーターにて設定しようとして詰まったAFTR取得に関するメモ。
Linuxルーターを使ってる人向けのニッチなものだけど、情報として残しておく。
To install, make sure you install the openai CLI:
pip3 install openai
which openai
to get the full path of where the executable is/opt/homebrew/bin/openai
in the script with your path if it's different set OPENAI_API_KEY to "xxx"
to use your OpenAI keyTo use GPT3.5-turbo instead of gpt-4, change /opt/homebrew/bin/openai api chat_completions.create -m gpt-4
to -m gpt-3.5-turbo
or other model with larger context window.
#!/bin/bash | |
# Function to display usage information | |
usage() { | |
echo "Usage: $0 /path/to/input.mp4 [ /path/to/output_directory ]" | |
exit 1 | |
} | |
# Check if at least one argument (input file) is provided | |
if [ $# -lt 1 ]; then |
sudo apt install curl gnupg2 ca-certificates lsb-release | |
echo "deb http://nginx.org/packages/ubuntu `lsb_release -cs` nginx" | sudo tee /etc/apt/sources.list.d/nginx.list | |
curl -fsSL https://nginx.org/keys/nginx_signing.key | sudo apt-key add - | |
sudo apt update | |
NGINX_VERSION=$(apt show nginx | grep "^Version" | cut -d " " -f 2 | cut -d "-" -f 1) | |
# take note of the nginx version in the "stable" release. e.g. 1.14.2 | |
echo NGINX version $NGINX_VERSION | |
wget https://hg.nginx.org/pkg-oss/raw-file/default/build_module.sh | |
chmod a+x build_module.sh |
<?xml version="1.0"?> | |
<!DOCTYPE rdf:RDF [ | |
<!ENTITY vin "http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#" > | |
<!ENTITY food "http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#" > | |
<!ENTITY owl "http://www.w3.org/2002/07/owl#" > | |
<!ENTITY xsd "http://www.w3.org/2001/XMLSchema#" > | |
]> | |
<rdf:RDF | |
xmlns = "http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#" |
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
""" | |
url matching regex | |
http://ryancompton.net/2015/02/16/url-extraction-in-python/ | |
http://daringfireball.net/2010/07/improved_regex_for_matching_urls | |
Example : |
#!/bin/bash | |
git-random(){ gitRan=$(curl -L -s http://whatthecommit.com/ |grep -A 1 "\"c" |tail -1 |sed 's/<p>//'); git commit -S -m "$gitRan"; } | |
if [ -z "$1" ]; then | |
git add --all . | |
git-random | |
else | |
git add --all . | |
git commit -S -m "$*" |
Graphic via State of Florida CFO Vendor Payment Search (flair.myfloridacfo.com)
This is a quick command I use to snapshot webpages that have a fun image I want to keep for my own collection of WTFViz. Why not just right-click and save the image? Oftentimes, the webpage in which the image is embedded contains necessary context, such as captions and links to important documentation just incase you forget what exactly that fun graphic was trying to explain.
#!/bin/bash | |
time_stamp=$(date +%Y%m%d) | |
mkdir -p ~/Backup/Desktop/$time_stamp | |
mv ~/Desktop/* ~/Backup/Desktop/$time_stamp |