-
Using aws cli for S3 inside docker
read AWS_ACCESS_KEY_ID read AWS_SECRET_ACCESS_KEY export AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY docker run --rm \ -e 'AWS_ACCESS_KEY_ID' -e 'AWS_SECRET_ACCESS_KEY' \ -v "$PWD:/aws" \ 'docker.io/amazon/aws-cli:latest' \ --endpoint-url='https://archive.pscloud.io' \ --region='kz-ala-1' \ s3 cp './local-file' 's3://bucket/key/name'
-
gdb cheatsheet
target remote 127.0.0.1:4242 p/z $r0 # print, z: hex; t: two x/z 0x40021008 # eXamine display/z $r0 display/4i $pc - 1 display/z *((int*)$sp)@4 stepi # step instruction info registers
-
Install homebrew package without homebrew
Example URLs:
https://formulae.brew.sh/formula/stlink https://formulae.brew.sh/api/formula/stlink.json .bottle.stable.arm64_ventura.url: https://ghcr.io/v2/homebrew/core/stlink/blobs/sha256:37bc6182a2709fbcd5046be4c1cb93936475f12d2ee42983e9f7802ed89bc97c https://formulae.brew.sh/api/formula/libusb.json .bottle.stable.arm64_ventura.url: https://ghcr.io/v2/homebrew/core/libusb/blobs/sha256:ea8a4a04b5cc81eff38d0c5cdfe2fbac519ca2c7652c64371074f4abaf766a0b
Keychain Access, Certificate Assistant, Create a Certificate, Code Signing
curl -L -H 'Authorization: Bearer QQ==' -o 'stlink-bottle.tar.gz' 'https://ghcr.io/v2/homebrew/core/stlink/blobs/sha256:37bc6182a2709fbcd5046be4c1cb93936475f12d2ee42983e9f7802ed89bc97c' curl -L -H 'Authorization: Bearer QQ==' -o 'libusb-bottle.tar.gz' 'https://ghcr.io/v2/homebrew/core/libusb/blobs/sha256:ea8a4a04b5cc81eff38d0c5cdfe2fbac519ca2c7652c64371074f4abaf766a0b' tar -x -f stlink-bottle.tar.gz tar -x -f libusb-bottle.tar.gz mkdir stlink-1.7.0 mv stlink/1.7.0/bin/* stlink-1.7.0/ mv libusb/1.0.26/lib/libusb-1.0.0.dylib stlink-1.7.0/ otool -L stlink-1.7.0/st-flash install_name_tool -change '@@HOMEBREW_PREFIX@@/opt/libusb/lib/libusb-1.0.0.dylib' '/opt/stlink-1.7.0/libusb-1.0.0.dylib' stlink-1.7.0/st-flash install_name_tool -change '@@HOMEBREW_PREFIX@@/opt/libusb/lib/libusb-1.0.0.dylib' '/opt/stlink-1.7.0/libusb-1.0.0.dylib' stlink-1.7.0/st-info install_name_tool -change '@@HOMEBREW_PREFIX@@/opt/libusb/lib/libusb-1.0.0.dylib' '/opt/stlink-1.7.0/libusb-1.0.0.dylib' stlink-1.7.0/st-trace install_name_tool -change '@@HOMEBREW_PREFIX@@/opt/libusb/lib/libusb-1.0.0.dylib' '/opt/stlink-1.7.0/libusb-1.0.0.dylib' stlink-1.7.0/st-util codesign -s 'Vladimir Bezhenar' -f stlink-1.7.0/st-flash codesign -s 'Vladimir Bezhenar' -f stlink-1.7.0/st-info codesign -s 'Vladimir Bezhenar' -f stlink-1.7.0/st-trace codesign -s 'Vladimir Bezhenar' -f stlink-1.7.0/st-util sudo cp -r stlink-1.7.0 /opt/stlink-1.7.0
-
keytool cheatsheet
keytool -import -alias alias -keystore keystore.jks -file certificate.der
-
kubectl exec etcdctl
Invoking etcdctl using kubectl for kubeadm cluster
kubectl exec -n kube-system etcd-control-0 -- sh -c 'ETCDCTL_API=3 etcdctl --endpoints=https://127.0.0.1:2379 --cacert /etc/kubernetes/pki/etcd/ca.crt --cert /etc/kubernetes/pki/etcd/server.crt --key /etc/kubernetes/pki/etcd/server.key member list'
-
maven minimal pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0"> <modelVersion>4.0.0</modelVersion> <groupId>java-21-test</groupId> <artifactId>java-21-test</artifactId> <version>0.0.0-SNAPSHOT</version> <properties> <maven.compiler.release>21</maven.compiler.release> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <maven-clean-plugin.version>3.3.1</maven-clean-plugin.version> <maven-compiler-plugin.version>3.11.0</maven-compiler-plugin.version> <maven-enforcer-plugin.version>3.4.1</maven-enforcer-plugin.version> <maven-jar-plugin.version>3.3.0</maven-jar-plugin.version> <maven-resources-plugin.version>3.3.1</maven-resources-plugin.version> <maven-surefire-plugin.version>3.1.2</maven-surefire-plugin.version> <versions-maven-plugin.version>2.16.1</versions-maven-plugin.version> </properties> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-enforcer-plugin</artifactId> <executions> <execution> <id>enforce-maven</id> <goals> <goal>enforce</goal> </goals> <configuration> <rules> <requireMavenVersion> <version>3.9.5</version> </requireMavenVersion> </rules> </configuration> </execution> </executions> </plugin> </plugins> <pluginManagement> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-clean-plugin</artifactId> <version>${maven-clean-plugin.version}</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>${maven-compiler-plugin.version}</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-enforcer-plugin</artifactId> <version>${maven-enforcer-plugin.version}</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <version>${maven-jar-plugin.version}</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin</artifactId> <version>${maven-resources-plugin.version}</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>${maven-surefire-plugin.version}</version> </plugin> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>versions-maven-plugin</artifactId> <version>${versions-maven-plugin.version}</version> </plugin> </plugins> </pluginManagement> </build> </project>
mvn versions:display-property-updates
-
openssl print utf8
openssl x509 -in cert.pem -nameopt utf8,sep_multiline -text
-
Oracle Linux Cloud default user
cloud-user
-
psql essentials
Invocation:
psql -h host -p port -U user dbname
List tables:
\dt [*tbl*]
Show DDL:
\d tbl
-
Customize fat label with qemu virtual fat driver
-blockdev driver=vvfat,node-name=cidata,read-only=on,dir="$cidata_dir",label='CIDATA' \ -device virtio-blk-pci,drive=cidata \
-
Retrieve graphql schema
npm install gql-sdl npx gql-sdl -H 'Cookie:auth=token' https://example.com/graphql > example.graphql