This file contains hidden or 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
You are a powerful agentic AI coding assistant, powered by Claude 3.5 Sonnet. You operate exclusively in Cursor, the world's best IDE. | |
You are pair programming with a USER to solve their coding task. | |
The task may require creating a new codebase, modifying or debugging an existing codebase, or simply answering a question. | |
Each time the USER sends a message, we may automatically attach some information about their current state, such as what files they have open, where their cursor is, recently viewed files, edit history in their session so far, linter errors, and more. | |
This information may or may not be relevant to the coding task, it is up for you to decide. | |
Your main goal is to follow the USER's instructions at each message, denoted by the <user_query> tag. | |
<communication> | |
1. Be conversational but professional. |
This file contains hidden or 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
find . -name '*.java' | xargs wc -l |
This file contains hidden or 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
[user@fdr-lnx ~]$ nmcli connection down MyFedoraHotspot | |
Connection 'MyFedoraHotspot' successfully deactivated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/16) | |
[user@fdr-lnx ~]$ nmcli connection delete MyFedoraHotspot | |
Connection 'MyFedoraHotspot' (076c78bf-9e91-4779-832e-7306adb7b277) successfully deleted. | |
[user@fdr-lnx ~]$ ls -lh /etc/NetworkManager/system-connections/ | grep MyFedoraHotspot | |
[user@fdr-lnx ~]$ nmcli con add type wifi ifname wlp0s30f4 con-name MyFedoraHotspot autoconnect yes ssid MyFedoraHotspot | |
Connection 'MyFedoraHotspot' (9ec71f65-881b-43b3-b666-710a21d5c6a9) successfully added. | |
[user@fdr-lnx ~]$ nmcli con modify MyFedoraHotspot 802-11-wireless.mode ap 802-11-wireless.band bg ipv4.method shared | |
[user@fdr-lnx ~]$ nmcli con modify MyFedoraHotspot wifi-sec.key-mgmt none | |
Warning: WEP encryption is known to be insecure. |
This file contains hidden or 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
git commit --amend -m "New commit message." | |
git push --force <remoteName> <branchName> | |
# https://linuxize.com/post/change-git-commit-message/ |
This file contains hidden or 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
for i in $(seq -w 1 02); | |
do | |
for j in $(seq -w 10); | |
do | |
for k in $(seq -w 16); | |
do | |
printf '%s:%s:%s,\t' "$i" "$j" "$k"; | |
done | |
done | |
done |
This file contains hidden or 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://stackoverflow.com/questions/9090817/copying-files-using-rsync-from-remote-server-to-local-machine | |
# https://explainshell.com/explain?cmd=rsync+-havzP+-e+%22ssh+-p+%24portNumber%22+user%40remote.host%3A%2Fpath%2Fto%2Fcopy+%2Flocal%2Fpath | |
# copy files from remote host with specific ssh port | |
rsync -havzP -e "ssh -p portNumber" [email protected]:/path/to/copy /local/path | |
# copy abc into local def | |
rsync -avzP user@remote-host:/source/folder/abc /destinate/folder/def/ | |
# copy the files in abc into local abc |
This file contains hidden or 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 base64 | |
import subprocess | |
from Crypto.Cipher import AES | |
from Crypto.Util.Padding import pad, unpad | |
# Python 3.11.3 | |
# pycryptodome-3.18.0-cp35-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | |
def pad_pkcs5(byte_array: bytearray, block_size: int): | |
""" |
This file contains hidden or 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
cat /dev/urandom | tr -cd 'a-zA-Z0-9' | head -c 32 | xargs |
This file contains hidden or 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
jwtkey=/home/jwt/sign/keys | |
mkdir -p $jwtkey | |
openssl genrsa -out $jwtkey/rsa-prv.pem 2048 | |
openssl rsa -in $jwtkey/rsa-prv.pem -pubout > $jwtkey/rsa-pub.pem | |
# OpenSSL `1.0.2k-fips on 26 Jan 2017` on `CentOS Linux release 7.9.2009 (Core)` gives pkcs#1 with -----BEGIN RSA PRIVATE KEY----- | |
# OpenSSL `3.0.8 7 Feb 2023 (Library: OpenSSL 3.0.8 7 Feb 2023)` on `Fedora release 38 (Thirty Eight)` gives pkcs#8 with -----BEGIN PRIVATE KEY----- |
This file contains hidden or 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
for ((i=1; i<=50; i++)); do curl -X POST http://127.0.0.1:8090/myapi/demo; echo ""; done; |
NewerOlder