This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import os | |
import sys | |
from groq import Groq | |
def main(): | |
client = Groq( | |
api_key=os.environ.get("GROQ_API_KEY"), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
rm -rf /tmp/tls_tst | |
mkdir /tmp/tls_tst | |
pushd /tmp/tls_tst | |
# Generate a private key for the CA | |
openssl genrsa -out ca.key 2048 | |
# Create a self-signed certificate for the CA |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Description: A function to use openai's gpt-4-turbo-preview chat completions | |
# to generate responses to input. It uses redis to cache responses for 1 hour | |
# and has a flag to skip cached results. | |
# Usage: ai [-s|--skip-cache] [input] | |
function ai { | |
## check if we should skip cache | |
skip_cache=false | |
while true; do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3024 Day | |
3024 Night | |
Aardvark Blue | |
Abernathy | |
Adventure | |
AdventureTime | |
Afterglow | |
Alabaster | |
AlienBlood | |
Andromeda |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/usr/bin/env bash | |
# start redis cluster using tmux | |
function create_redis_cluster { | |
mkdir cluster-test | |
cd cluster-test | |
mkdir 7001 7002 7003 7004 7005 7006 || true | |
# create redis cluster | |
for port in 7001 7002 7003 7004 7005 7006 | |
do | |
echo "port $port" > $port/redis.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cluster: | |
nodes: 6 | |
metrics: | |
enabled: true | |
extraArgs: | |
skip-tls-verification: "true" | |
password: ************* | |
persistence: | |
size: 16Gi | |
rbac: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<users> | |
<!-- If user name was not specified, 'default' user is used. --> | |
<user_name> | |
<password></password> | |
<!-- Or --> | |
<password_sha256_hex></password_sha256_hex> | |
<access_management>1</access_management> | |
<networks incl="networks" replace="replace"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo ' | |
[credential] | |
helper = store | |
[url "git@github.com:"] | |
insteadOf = https://github.com/' >> ~/.gitconfig |
NewerOlder