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
| #!/usr/bin/env bash | |
| # ~/.claude/statusline-command.sh | |
| # Claude Code status line: model | context % + tokens | dir | git branch | |
| input=$(cat) | |
| # --- Parse fields from JSON --- | |
| model=$(echo "$input" | jq -r '.model.display_name // "Claude"') | |
| # Strip trailing parenthesized qualifier: "Opus 4.6 (1M context)" -> "Opus 4.6" | |
| model="${model% (*}" |
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
| geo $admin_users { | |
| default 0; | |
| #Allowed IPs ie: | |
| 10.0.0.4/32 1; | |
| } | |
| server { | |
| real_ip_header X-Forwarded-For; | |
| set_real_ip_from 0.0.0.0/0; |
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
| [Unit] | |
| Description=vault server | |
| Requires=network-online.target | |
| After=network-online.target | |
| [Service] | |
| EnvironmentFile=-/etc/default/vault | |
| Restart=on-failure | |
| ExecStart=/usr/local/bin/vault server $OPTIONS -config=/etc/vault.d/vault.conf |
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
| #!/usr/bin/env bash | |
| set -e | |
| echo "Installing dependencies..." | |
| sudo apt-get update -y | |
| sudo apt-get install -y unzip | |
| echo "Fetching vault..." | |
| VAULT=0.9.1 |
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
| #!/bin/bash | |
| RED='\033[0;31m' | |
| GREEN='\033[0;32m' | |
| NC='\033[0m' # No Color | |
| programs=(Nodejs Gulp Foreverjs MongoDB) | |
| function printInstallingMessage { | |
| printf "${GREEN}Installing $1...${NC}\n" | |
| } |
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
| #!/bin/sh | |
| # Add this file to cron using `@reboot ~/app-starter.sh ~/some-folder/some-project-folder` | |
| if [ $(ps aux | grep $USER | grep node | grep -v grep | wc -l | tr -s "\n") -eq 0 ] | |
| then | |
| export NODE_ENV=production | |
| export PATH=/usr/local/bin:$PATH | |
| cd $1 | |
| npm start > /dev/null | |
| fi |
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
| #! /bin/bash | |
| hasDomain=false | |
| while [ $hasDomain = false ]; do | |
| echo "Domain: " | |
| read domain | |
| read -p "Do you want to use $domain as filename? " yn | |
| case $yn in | |
| [Yy]* ) hasDomain=true; |
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
| var parser = document.createElement('a'); | |
| parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
| parser.protocol; // => "http:" | |
| parser.hostname; // => "example.com" | |
| parser.port; // => "3000" | |
| parser.pathname; // => "/pathname/" | |
| parser.search; // => "?search=test" | |
| parser.hash; // => "#hash" | |
| parser.host; // => "example.com:3000" |