Skip to content

Instantly share code, notes, and snippets.

View andresjz's full-sized avatar
🏠
Working from home

Luis Juárez andresjz

🏠
Working from home
View GitHub Profile
@chenhunghan
chenhunghan / gist.md
Last active April 15, 2026 19:21
One Prompt to Save 90% Context for Any MCP Server

Local Code Mode for MCP

Most MCP servers just wrap CRUD JSON APIs into tools — I did it too with scim-mcp and garmin-mcp-app. It works, until you realize a tool call dumps 50KB+ into context.

MCP isn't dead — but we need to design MCP tools with the context window in mind.

@ruanbekker
ruanbekker / promtail_docker_logs.md
Last active September 27, 2025 23:41
Docker Container Logging using Promtail
@ezamelczyk
ezamelczyk / gitcount.sh
Created June 14, 2019 09:45
Git count lines by author
#!/bin/sh
git log --shortstat | grep -E "(Author: )(\b\s*([A-Z]\w+)){2}|fil(e|es) changed" | awk '
{
if($1 ~ /Author/) {
author = $2" "$3
} else {
files[author]+=$1
inserted[author]+=$4
deleted[author]+=$6
}
@res0nat0r
res0nat0r / mfa.md
Last active October 11, 2021 23:01
Delete virtual MFA device from AWS account with awscli
aws iam deactivate-mfa-device --user-name user@example.com --serial-number \
  arn:aws:iam::12345:mfa/user\@example.com

aws iam delete-virtual-mfa-device --serial-number arn:aws:iam::12345:mfa/user\@example.com
@mbaitelman
mbaitelman / README.md
Last active November 26, 2025 14:55
Automated Terraform Deployments Using Bitbucket Pipelines
@robhrt7
robhrt7 / MySQL_5-7_macOS.md
Last active December 23, 2025 00:39 — forked from nrollr/MySQL_macOS_Sierra.md
Install MySQL 5.7 on macOS using Homebrew

This is a fork of original gist https://gist.github.com/nrollr/3f57fc15ded7dddddcc4e82fe137b58e, with slight changes on pointing to 5.7 version branch, instead of 8 (latest default of MySQL in Hombrew).

Install MySQL 5.7 on macOS

This procedure explains how to install MySQL using Homebrew on macOS (Sierra 10.12 and up)

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Note: Homebrew will download and install Command Line Tools for Xcode 8.0 as part of the installation process.
@sgreben
sgreben / apk flags.md
Created April 13, 2018 13:09
apk flags

apk

apk-tools 2.8.2, compiled for x86_64.

usage: apk COMMAND [-h|--help] [-p|--root DIR] [-X|--repository REPO] [-q|--quiet] [-v|--verbose] [-i|--interactive] [-V|--version] [-f|--force]
           [--force-binary-stdout] [--force-broken-world] [--force-non-repository] [--force-old-apk] [--force-overwrite] [--force-refresh] [-U|--update-cache]
           [--progress] [--progress-fd FD] [--no-progress] [--purge] [--allow-untrusted] [--wait TIME] [--keys-dir KEYSDIR] [--repositories-file REPOFILE]
           [--no-network] [--no-cache] [--cache-dir CACHEDIR] [--arch ARCH] [--print-arch] [ARGS]...
@tstrohmeier
tstrohmeier / bitbucket-pipelines.yml
Last active September 5, 2022 08:46
AWS ECS: Deploy Docker Container from Bitbucket Pipeline to AWS ECR
# enable Docker for your repository
options:
docker: true
pipelines:
branches:
development:
- step:
#python image with aws-cli installed
@rezafarhadur
rezafarhadur / install virtualenv ubuntu 16.04.md
Last active July 17, 2025 07:53
How to install virtual environment on ubuntu 16.04

How to install virtualenv:

Install pip first

sudo apt-get install python3-pip

Then install virtualenv using pip3

sudo pip3 install virtualenv 
@razorcd
razorcd / Angular2 ngModel manipulation directive
Created November 11, 2016 15:05
Angular 2 directive that manipulates the `ngModel` value on every change.
import {Directive, Attribute} from 'angular2/core';
import {NgModel} from 'angular2/common';
@Directive({
selector: '[mask]',
host: {
'(keyup)' : 'onInputChange()'
}
})
export class MaskDirective{