Skip to content

Instantly share code, notes, and snippets.

View tecnologer's full-sized avatar
👨‍💻
Focusing

Rey David Dominguez Soto tecnologer

👨‍💻
Focusing
View GitHub Profile
@tecnologer
tecnologer / README.md
Last active November 17, 2025 11:38
Battery Alerts (Display-Centered Popups) for MacOS

Battery Alerts (Display-Centered Popups) for MacOS

This script provides a way to display battery alerts on MacOS using display-centered popups.

It could be configured as a LaunchAgent to run at user login or at specific intervals to monitor battery status and notify the user when the battery level is low or charged.

  • discharging and drops below a threshold
image
@tecnologer
tecnologer / README.md
Last active September 6, 2025 00:20
Battery Alert Notifications on Pop!_OS 22.04 (GNOME/X11)

Battery Alerts (Cursor-Centered Popups) for Pop!_OS / GNOME (X11)

Get visible pop-up alerts when your laptop battery:

  • discharging and drops below a threshold
image
  • charging and reaches a target level.

Code Stats

This script checks your code stats of the current dir. If previous stats are stored, they could be compared to them.

Preconditions

Requires [tokei][1], you could install it using:

  • Debian/Ubuntu: apt install tokei
  • Mac: brew install tokei
@tecnologer
tecnologer / main.go
Created June 15, 2024 07:24
Programacion funcional - transform (map)
package main
import (
"fmt"
"math"
"strconv"
"strings"
"golang.org/x/text/cases"
"golang.org/x/text/language"
@tecnologer
tecnologer / create_db.sh
Created February 19, 2024 19:07
create docker database psql|mysql
#!/bin/bash
# Function to display help
function display_help() {
echo "Usage: $0 <db-type> [OPTIONS]"
echo "db-type: Type of the database ('psql' for PostgreSQL, 'mysql' for MySQL)."
echo "Options:"
echo " --container-name Name of the Docker container to be used. Default is 'docker-postgres' for PostgreSQL and 'docker-mysql' for MySQL."
echo " --db-password Password for the database. Default is 'S3cret*_2024'."
echo " --db-user User for the database. Default is 'admin' for mysql and 'postgres' for psql."
@tecnologer
tecnologer / .golangci.yml
Last active April 18, 2024 17:36
Install and configure golangci-lint
linters-settings:
cyclop:
skip-tests: true
tagalign:
align: true
sort: true
order:
- json
- validate
- gorm
@tecnologer
tecnologer / chat.go
Last active January 31, 2024 17:36
Factory to build Functions objects for OpenAI API
package agent
import (
"context"
"encoding/json"
"fmt"
"github.com/pkg/errors"
"github.com/tmc/langchaingo/llms"
"github.com/tmc/langchaingo/llms/openai"
"github.com/tmc/langchaingo/schema"
@tecnologer
tecnologer / main.go
Created January 25, 2024 16:26
Parses Go's functions to JSON Schema to use with OpenAI API functions
package main
import (
"flag"
"fmt"
"go/ast"
"go/parser"
"go/token"
"os"
"regexp"
@tecnologer
tecnologer / Code.cs
Created November 17, 2022 16:05
CodeQR
public class CodeQR
{
public Code Code {get;}
public CodeQR() {
Code = new Code();
}
public int GetCode()
{
@tecnologer
tecnologer / agnoster.zsh-theme
Created September 26, 2022 15:35
zsh theme custom
# vim:ft=zsh ts=2 sw=2 sts=2
#
# agnoster's Theme - https://gist.github.com/3712874
# A Powerline-inspired theme for ZSH
#
# # README
#
# In order for this theme to render correctly, you will need a
# [Powerline-patched font](https://github.com/Lokaltog/powerline-fonts).
# Make sure you have a recent version: the code points that Powerline