Skip to content

Instantly share code, notes, and snippets.

View beogip's full-sized avatar
🤖
Robot mode

Juan Ignacio Gipponi beogip

🤖
Robot mode
View GitHub Profile
@beogip
beogip / statusline-command.sh
Last active June 2, 2026 11:47
Claude Code status line: model | context % + tokens | dir | git branch
#!/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% (*}"
@beogip
beogip / maintenance-site.conf
Last active April 20, 2018 20:26
A maintenance site configuration with forward by ip for nginx
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;
@beogip
beogip / vault.service
Created January 24, 2018 19:53 — forked from ewilde/vault.service
for development only /etc/systemd/system/vault.service
[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
@beogip
beogip / vault-install.sh
Last active January 24, 2018 19:53 — forked from ewilde/vault-install.sh
Install hashicorp vault on ubuntu using systemd
#!/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
#!/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"
}
#!/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
@beogip
beogip / ssl.sh
Last active March 31, 2016 01:48
Helper for ssl crt generator
#! /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;
@beogip
beogip / uri.js
Last active August 29, 2015 14:23 — forked from jlong/uri.js
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"