mirror of
https://github.com/mr0xb/dotfiles.git
synced 2026-08-27 19:34:57 -04:00
updates
This commit is contained in:
parent
807b7a4504
commit
d7e2aa1af6
13 changed files with 280 additions and 1 deletions
|
|
@ -1,6 +1,9 @@
|
||||||
{
|
{
|
||||||
"env": {
|
"env": {
|
||||||
"CLAUDE_CODE_MAX_OUTPUT_TOKENS": "100000"
|
"CLAUDE_CODE_MAX_OUTPUT_TOKENS": "100000",
|
||||||
|
"OBSIDIAN_API_KEY": "7079ccd0a88f83f4a96fd9564bf25b3cb21fce1bff6d9e5b213c02b8b3af6d57",
|
||||||
|
"OBSIDIAN_PORT": "27124",
|
||||||
|
"OBSIDIAN_VAULT": "https://127.0.0.1:27124/vault"
|
||||||
},
|
},
|
||||||
"hooks": {
|
"hooks": {
|
||||||
"Notification": [
|
"Notification": [
|
||||||
|
|
@ -29,6 +32,16 @@
|
||||||
"timeout": 2
|
"timeout": 2
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"matcher": "Write",
|
||||||
|
"hooks": [
|
||||||
|
{
|
||||||
|
"type": "command",
|
||||||
|
"command": "jq -r '.tool_input.file_path // .tool_response.filePath // \"\"' | { read -r f; if [[ \"$f\" =~ docs/superpowers/specs/.*\\.md$ ]]; then project=$(basename \"$(git -C \"$(dirname \"$f\")\" rev-parse --show-toplevel 2>/dev/null)\" 2>/dev/null || echo \"unknown\"); filename=$(basename \"$f\"); curl -s -k -X PUT \"$OBSIDIAN_VAULT/Claude/$project/$filename\" -H \"Authorization: Bearer $OBSIDIAN_API_KEY\" -H \"Content-Type: text/markdown\" --data-binary \"@$f\" 2>/dev/null || true; fi; } 2>/dev/null || true",
|
||||||
|
"async": true
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"PostToolUseFailure": [
|
"PostToolUseFailure": [
|
||||||
|
|
|
||||||
19
docker_files/awscli/Dockerfile
Normal file
19
docker_files/awscli/Dockerfile
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
FROM alpine:latest
|
||||||
|
|
||||||
|
RUN apk --no-cache add \
|
||||||
|
ca-certificates \
|
||||||
|
groff \
|
||||||
|
less \
|
||||||
|
python3 \
|
||||||
|
py3-pip \
|
||||||
|
&& pip3 install awscli \
|
||||||
|
&& mkdir -p /root/.aws \
|
||||||
|
&& { \
|
||||||
|
echo '[default]'; \
|
||||||
|
echo 'output = json'; \
|
||||||
|
echo 'region = us-east-1'; \
|
||||||
|
echo 'aws_access_key_id = $AMAZON_ACCESS_KEY_ID'; \
|
||||||
|
echo 'aws_secret_access_key = $AMAZON_SECRET_ACCESS_KEY'; \
|
||||||
|
} > /root/.aws/config
|
||||||
|
|
||||||
|
ENTRYPOINT [ "aws" ]
|
||||||
24
docker_files/awscli/install.sh
Normal file
24
docker_files/awscli/install.sh
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
|
||||||
|
cat > ../bin/yq <<EOF
|
||||||
|
yq () {
|
||||||
|
docker run \\
|
||||||
|
--rm \\
|
||||||
|
--net none \\
|
||||||
|
--pid host \\
|
||||||
|
--name yq \\
|
||||||
|
--entrypoint "yq" \\
|
||||||
|
-i \\
|
||||||
|
\${DOCKER_REPO_PREFIX}/yq "\$@"
|
||||||
|
}
|
||||||
|
|
||||||
|
jq () {
|
||||||
|
docker run \\
|
||||||
|
--rm \\
|
||||||
|
--net none \\
|
||||||
|
--pid host \\
|
||||||
|
--name yq \\
|
||||||
|
--entrypoint "jq \\
|
||||||
|
-i \\
|
||||||
|
\${DOCKER_REPO_PREFIX}/yq "\$@"
|
||||||
|
}
|
||||||
|
EOF
|
||||||
59
docker_files/chrome/Dockerfile
Normal file
59
docker_files/chrome/Dockerfile
Normal file
|
|
@ -0,0 +1,59 @@
|
||||||
|
# Run Chrome in a container
|
||||||
|
#
|
||||||
|
# docker run -it \
|
||||||
|
# --net host \ # may as well YOLO
|
||||||
|
# --cpuset-cpus 0 \ # control the cpu
|
||||||
|
# --memory 512mb \ # max memory it can use
|
||||||
|
# -v /tmp/.X11-unix:/tmp/.X11-unix \ # mount the X11 socket
|
||||||
|
# -e DISPLAY=unix$DISPLAY \
|
||||||
|
# -v $HOME/Downloads:/home/chrome/Downloads \
|
||||||
|
# -v $HOME/.config/google-chrome/:/data \ # if you want to save state
|
||||||
|
# --security-opt seccomp=$HOME/chrome.json \
|
||||||
|
# --device /dev/snd \ # so we have sound
|
||||||
|
# --device /dev/dri \
|
||||||
|
# -v /dev/shm:/dev/shm \
|
||||||
|
# --name chrome \
|
||||||
|
# jess/chrome
|
||||||
|
#
|
||||||
|
# You will want the custom seccomp profile:
|
||||||
|
# wget https://raw.githubusercontent.com/jfrazelle/dotfiles/master/etc/docker/seccomp/chrome.json -O ~/chrome.json
|
||||||
|
|
||||||
|
# Base docker image
|
||||||
|
FROM debian:bullseye-slim
|
||||||
|
#LABEL maintainer "Jessie Frazelle <jess@linux.com>"
|
||||||
|
|
||||||
|
# Install Chrome
|
||||||
|
RUN apt-get update && apt-get install -y \
|
||||||
|
apt-transport-https \
|
||||||
|
ca-certificates \
|
||||||
|
curl \
|
||||||
|
gnupg \
|
||||||
|
hicolor-icon-theme \
|
||||||
|
libcanberra-gtk* \
|
||||||
|
libgl1-mesa-dri \
|
||||||
|
libgl1-mesa-glx \
|
||||||
|
libpangox-1.0-0 \
|
||||||
|
libpulse0 \
|
||||||
|
libv4l-0 \
|
||||||
|
fonts-symbola \
|
||||||
|
--no-install-recommends \
|
||||||
|
&& curl -sSL https://dl.google.com/linux/linux_signing_key.pub | apt-key add - \
|
||||||
|
&& echo "deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google.list \
|
||||||
|
&& apt-get update && apt-get install -y \
|
||||||
|
google-chrome-stable \
|
||||||
|
--no-install-recommends \
|
||||||
|
&& apt-get purge --auto-remove -y curl \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# Add chrome user
|
||||||
|
RUN groupadd -r chrome && useradd -r -g chrome -G audio,video chrome \
|
||||||
|
&& mkdir -p /home/chrome/Downloads && chown -R chrome:chrome /home/chrome
|
||||||
|
|
||||||
|
COPY local.conf /etc/fonts/local.conf
|
||||||
|
|
||||||
|
# Run Chrome as non privileged user
|
||||||
|
USER chrome
|
||||||
|
|
||||||
|
# Autorun chrome
|
||||||
|
ENTRYPOINT [ "google-chrome" ]
|
||||||
|
CMD [ "--user-data-dir=/data" ]
|
||||||
34
docker_files/chrome/local.conf
Normal file
34
docker_files/chrome/local.conf
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
<?xml version='1.0'?>
|
||||||
|
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
|
||||||
|
<fontconfig>
|
||||||
|
<match target="font">
|
||||||
|
<edit mode="assign" name="rgba">
|
||||||
|
<const>rgb</const>
|
||||||
|
</edit>
|
||||||
|
</match>
|
||||||
|
<match target="font">
|
||||||
|
<edit mode="assign" name="hinting">
|
||||||
|
<bool>true</bool>
|
||||||
|
</edit>
|
||||||
|
</match>
|
||||||
|
<match target="font">
|
||||||
|
<edit mode="assign" name="hintstyle">
|
||||||
|
<const>hintslight</const>
|
||||||
|
</edit>
|
||||||
|
</match>
|
||||||
|
<match target="font">
|
||||||
|
<edit mode="assign" name="antialias">
|
||||||
|
<bool>true</bool>
|
||||||
|
</edit>
|
||||||
|
</match>
|
||||||
|
<match target="font">
|
||||||
|
<edit mode="assign" name="lcdfilter">
|
||||||
|
<const>lcddefault</const>
|
||||||
|
</edit>
|
||||||
|
</match>
|
||||||
|
<match target="font">
|
||||||
|
<edit name="embeddedbitmap" mode="assign">
|
||||||
|
<bool>false</bool>
|
||||||
|
</edit>
|
||||||
|
</match>
|
||||||
|
</fontconfig>
|
||||||
8
docker_files/github-dind/.idea/.gitignore
generated
vendored
Normal file
8
docker_files/github-dind/.idea/.gitignore
generated
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
# Default ignored files
|
||||||
|
/shelf/
|
||||||
|
/workspace.xml
|
||||||
|
# Editor-based HTTP Client requests
|
||||||
|
/httpRequests/
|
||||||
|
# Datasource local storage ignored files
|
||||||
|
/dataSources/
|
||||||
|
/dataSources.local.xml
|
||||||
9
docker_files/github-dind/.idea/github-dind.iml
generated
Normal file
9
docker_files/github-dind/.idea/github-dind.iml
generated
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="WEB_MODULE" version="4">
|
||||||
|
<component name="Go" enabled="true" />
|
||||||
|
<component name="NewModuleRootManager">
|
||||||
|
<content url="file://$MODULE_DIR$" />
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
</component>
|
||||||
|
</module>
|
||||||
8
docker_files/github-dind/.idea/modules.xml
generated
Normal file
8
docker_files/github-dind/.idea/modules.xml
generated
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectModuleManager">
|
||||||
|
<modules>
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/.idea/github-dind.iml" filepath="$PROJECT_DIR$/.idea/github-dind.iml" />
|
||||||
|
</modules>
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
30
docker_files/github-dind/Dockerfile
Normal file
30
docker_files/github-dind/Dockerfile
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
FROM registry.ic-ops.net/base/docker:23-dind
|
||||||
|
|
||||||
|
ARG GOOS=linux
|
||||||
|
ARG GOARCH=amd64
|
||||||
|
ARG VAULT_VERS=1.12.1
|
||||||
|
ARG GO_VERS=latest
|
||||||
|
ARG GO_TARGET_DIR=/usr/local/share
|
||||||
|
ARG JQ_VERS=latest
|
||||||
|
ARG YQ_VERS=latest
|
||||||
|
|
||||||
|
ENV ENV="/root/.profile"
|
||||||
|
|
||||||
|
RUN curl -L "https://github.com/mikefarah/yq/releases/${YQ_VERS}/download/yq_linux_amd64" -o "/usr/local/bin/yq" \
|
||||||
|
&& chmod +x /usr/local/bin/yq
|
||||||
|
RUN curl -L "https://github.com/jqlang/jq/releases/${JQ_VERS}/download/jq-linux-amd64" -o "/usr/local/bin/jq" \
|
||||||
|
&& chmod +x /usr/local/bin/jq
|
||||||
|
RUN curl -L "https://releases.hashicorp.com/vault/${VAULT_VERS}/vault_${VAULT_VERS}_linux_amd64.zip" -o /tmp/vault_${VAULT_VERS}_linux_amd64.zip \
|
||||||
|
&& unzip /tmp/vault_${VAULT_VERS}_linux_amd64.zip \
|
||||||
|
&& mv vault /usr/local/bin/vault \
|
||||||
|
&& rm /tmp/vault_${VAULT_VERS}_linux_amd64.zip
|
||||||
|
|
||||||
|
COPY install-go /tmp/install-go
|
||||||
|
RUN chmod +x /tmp/install-go \
|
||||||
|
&& sh /tmp/install-go \
|
||||||
|
&& rm /tmp/install-go
|
||||||
|
|
||||||
|
ENV PATH="/usr/local/bin/:$GO_TARGET_DIR/go/bin:$PATH"
|
||||||
|
ENV GOPATH="$GO_TARGET_DIR/go"
|
||||||
|
ENV GOBIN="$GO_TARGET_DIR/go/bin"
|
||||||
|
|
||||||
37
docker_files/github-dind/install-go
Normal file
37
docker_files/github-dind/install-go
Normal file
|
|
@ -0,0 +1,37 @@
|
||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
TARGETDIR=${GO_TARGET_DIR:="/usr/local/"}
|
||||||
|
|
||||||
|
lookup_file() {
|
||||||
|
curl -sSL "https://go.dev/dl/?mode=json" |
|
||||||
|
jq -r '.[0].files[]
|
||||||
|
| select(.os == "'"$GOOS"'")
|
||||||
|
| select(.arch == "'"$GOARCH"'")
|
||||||
|
| .filename'
|
||||||
|
}
|
||||||
|
|
||||||
|
fetch() {
|
||||||
|
local filename
|
||||||
|
if [ $GO_VERS == "latest" ]; then
|
||||||
|
filename="$(lookup_file)"
|
||||||
|
else
|
||||||
|
filename="$GO_VERS.$GOOS-$GOARCH.tar.gz"
|
||||||
|
fi
|
||||||
|
[[ -z "$filename" ]] && echo "unable to fetch filename" 1>&2 && return 1
|
||||||
|
local path="/tmp/$filename"
|
||||||
|
[[ -n "$DOWNLOADS" ]] && [[ -d "$DOWNLOADS" ]] && path="$DOWNLOADS/$filename"
|
||||||
|
curl -L "https://go.dev/dl/$filename" -o "$path"
|
||||||
|
echo "$path"
|
||||||
|
}
|
||||||
|
|
||||||
|
install_latest_go() {
|
||||||
|
local dir="$1" path
|
||||||
|
[[ -z "$dir" ]] && dir="$TARGETDIR"
|
||||||
|
[[ -z "$dir" ]] && dir="$HOME/.local"
|
||||||
|
mkdir -p "$dir" 2>/dev/null
|
||||||
|
path="$(fetch)"
|
||||||
|
[[ -z "$path" ]] && echo "unable to fetch go tarball" 1>&2 && return 1
|
||||||
|
rm -rf "$dir/go" && tar -C "$dir" -xzf "$path"
|
||||||
|
}
|
||||||
|
|
||||||
|
install_latest_go "$@"
|
||||||
5
docker_files/htop/Dockerfile
Normal file
5
docker_files/htop/Dockerfile
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
FROM debian:latest
|
||||||
|
|
||||||
|
RUN apt update && apt install -y htop
|
||||||
|
|
||||||
|
CMD ["htop"]
|
||||||
9
docker_files/yqjq/Dockerfile
Normal file
9
docker_files/yqjq/Dockerfile
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
FROM alpine:latest
|
||||||
|
|
||||||
|
RUN apk update && \
|
||||||
|
apk add \
|
||||||
|
yq \
|
||||||
|
jq
|
||||||
|
|
||||||
|
#CMD ["yq"]
|
||||||
|
ENTRYPOINT ["yq"]
|
||||||
24
docker_files/yqjq/install.sh
Normal file
24
docker_files/yqjq/install.sh
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
|
||||||
|
cat > ../bin/yq <<EOF
|
||||||
|
yq () {
|
||||||
|
docker run \\
|
||||||
|
--rm \\
|
||||||
|
--net none \\
|
||||||
|
--pid host \\
|
||||||
|
--name yq \\
|
||||||
|
--entrypoint "yq" \\
|
||||||
|
-i \\
|
||||||
|
\${DOCKER_REPO_PREFIX}/yq "\$@"
|
||||||
|
}
|
||||||
|
|
||||||
|
jq () {
|
||||||
|
docker run \\
|
||||||
|
--rm \\
|
||||||
|
--net none \\
|
||||||
|
--pid host \\
|
||||||
|
--name yq \\
|
||||||
|
--entrypoint "jq \\
|
||||||
|
-i \\
|
||||||
|
\${DOCKER_REPO_PREFIX}/yq "\$@"
|
||||||
|
}
|
||||||
|
EOF
|
||||||
Loading…
Reference in a new issue