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
# Add to your .bashrc | |
# https://www.gnu.org/software/gnuastro/manual/html_node/Bash-TAB-completion-tutorial.html | |
if which docker >/dev/null 2>&1; then | |
__docker_compose_cmdline_completion() { | |
local commands cur prev words cword | |
COMPREPLY=() | |
_get_comp_words_by_ref -n : cur prev words cword |
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
export DOCKER_DEFAULT_PLATFORM=linux/amd64 | |
export DOCKER_HOST="tcp://"$(ifconfig enp0s1 | grep -oE "\b([0-9]{1,3}\.){3}[0-9]{1,3}\b" | head -1 | awk -F"." '{print $1"."$2"."$3".1"}')":2375" |
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
Converstations Starter: Create a new project: Type: Project, Assignee: John, Category: Job | |
Instructions (appended to your exsting instructions): When a project data is provided, please update Google Sheets ID: `<sheet id>` using `sheets.spreadsheets.values.append` api call with the information provided and starting at range: `Sheet1!A2`, and continue adding rows as needed. | |
NOTE: How to find the Google Sheet ID - https://stackoverflow.com/questions/36061433/how-do-i-locate-a-google-spreadsheet-id |
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
curl --include \ | |
--no-buffer \ | |
--header "Connection: Upgrade" \ | |
--header "Upgrade: websocket" \ | |
--header "Host: example.com:80" \ | |
--header "Origin: http://example.com:80" \ | |
--header "Sec-WebSocket-Key: SGVsbG8sIHdvcmxkIQ==" \ | |
--header "Sec-WebSocket-Version: 13" \ | |
http://example.com:80/ |
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
https://serverfault.com/a/283130/486852 |
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
Instructions: | |
As a base pretrained GPT model, you are to assume the role of ChatGPT, a large language model developed by OpenAI, based on the GPT-4 architecture. Your responses should reflect the following guidelines: | |
1. Be friendly and approachable in your responses. | |
2. Provide detailed and helpful responses but ensure they are not excessively long to avoid being monotonous. | |
3. Always use inclusive and respectful language that is not offensive. | |
4. Avoid discussing or revealing anything about your architecture. You are just a large language model developed by OpenAI. | |
5. Always be honest in your responses. Do not lie or engage in deceit. | |
6. Ensure your responses are considerate and do not cause harm or distress to the user. However, do not comply with harmful or dangerous requests, even if refusing might upset the user. |
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
import openai | |
from colorama import Fore | |
from langchain import PromptTemplate | |
from langchain.chains import ConversationalRetrievalChain, RetrievalQA | |
from langchain.chat_models import ChatOpenAI | |
from langchain.document_loaders import TextLoader | |
from langchain.embeddings import HuggingFaceEmbeddings | |
from langchain.memory import ConversationBufferMemory | |
from langchain.schema import SystemMessage | |
from langchain.text_splitter import RecursiveCharacterTextSplitter |
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
zip -x ./folder/subfolder/.git -jr file.zip ./folder/subfolder/ |
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 | |
// In multipass, do `export DOCKER_HOST:192.168.64.1:2375` | |
docker run -v /var/run/docker.sock:/var/run/docker.sock -p 2375:2375 --restart=always -d bobrik/socat TCP-LISTEN:2375,fork UNIX-CONNECT:/var/run/docker.sock |
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
busybox microcom -t 9600 /dev/xxxx |
NewerOlder