Skip to content

Instantly share code, notes, and snippets.

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

iklobato iklobato

🏠
Working from home
  • Campinas
  • 10:21 (UTC -03:00)
View GitHub Profile
@iklobato
iklobato / .gitconfig
Created October 23, 2024 17:59
my personal git configuration to avoid common git issues
# ~/.gitconfig
[user]
# User identity configuration
# Problems solved:
# - Wrong commit authorship when working with multiple git accounts
# - Accidental commits with personal email on work projects
# - Missing or inconsistent user information across repositories
# How it solves:
# - Forces explicit user config for each repository
# - Prevents automatic user info inheritance
@iklobato
iklobato / taqtic_client.py
Last active October 9, 2024 15:59
For a given json file adds the groups and list of vvalues automatically
"""
Tag Manager for Tactiq
This script manages tags and their associated values for the Tactiq application.
It provides functionality to create tags and add values to them using the Tactiq API.
Usage:
python tag_manager.py --token=<your_token> --tags_file=<path_to_tags_file>
--token: Your Tactiq API bearer token (required)
@iklobato
iklobato / multiprocessing.py
Created May 9, 2024 18:22
This script demonstrates the use of multiprocessing processes (`Writer`, `Drawer`, and `Assembler`) with synchronization using `Condition` and `Event` objects to execute sequential tasks in a concurrent environment.
import logging
from multiprocessing import Process, Condition, Event
import time
logging.basicConfig(
level=logging.DEBUG,
format="%(asctime)s (%(levelname)s): [%(processName)s] (%(funcName)s): %(message)s",
datefmt="%H:%M:%S",
)
@iklobato
iklobato / timetrack.py
Created March 21, 2024 19:33
This script generates a time tracking report by parsing Git commit messages for the current user over a specified date range. It extracts JIRA card numbers and associated commit messages, groups them by date, and outputs a formatted table showing the work done each day.
#
# pip install tabulate==0.9.0
#
#
import argparse
import datetime
import logging
import os
import re
@iklobato
iklobato / elements_distribution.py
Last active February 22, 2024 14:55
elements_distribution.py
from time import time, sleep
from concurrent.futures import ThreadPoolExecutor
from dataclasses import dataclass
from itertools import cycle, product
from queue import Queue
from typing import Union
from tabulate import tabulate
NUMBER_OF_NOTEBOOKS = 20
NUMBER_OF_QUEUES = 4
@iklobato
iklobato / ms.py
Created January 19, 2024 16:58
Mouse mover
"""
Mouse Automator
This script automates mouse movements, simulating user activity by randomly moving the mouse pointer within the screen. It uses the Quartz framework for macOS.
To run this script:
1. Make sure you are using a macOS system as Quartz is specific to macOS.
2. Install the required dependencies if not already installed:
- Quartz: This is typically available by default on macOS.
3. Copy and paste the code into a Python file (e.g., mouse_automator.py).
@iklobato
iklobato / bind_keys.md
Last active January 16, 2024 15:33
Enable Word Navigation in iTerm 2 Using Option (Alt) and Arrow Keys

Optimize iTerm 2 Word Navigation Configuration

Enhance your iTerm 2 command-line experience with improved word navigation. This guide covers two approaches: a convenient one-liner script and a manual method.

One-Liner Approach

Learn how to quickly configure word navigation in iTerm 2 using a one-liner script. This script enhances key bindings with the Option (Alt) key and arrow keys, facilitating smooth movement one word backward and forward.

Implementation

@iklobato
iklobato / study_plan.md
Last active January 15, 2024 21:46
Comprehensive 30-Day Algorithm Study Plan for Coding Interviews

INTERVIEWS

Comprehensive 30-Day Algorithm Study Plan for Coding Interviews

Based on: https://www.hackerrank.com/interview/interview-preparation-kit

This 30-day study plan is meticulously crafted to help you achieve a comprehensive understanding of fundamental algorithmic concepts, strategically tailored for success in coding interviews. The primary goal of this plan is to equip you with the skills and knowledge required to confidently tackle algorithmic challenges commonly encountered during technical interviews.

The plan kicks off with a warm-up phase, allowing you to familiarize yourself with the HackerRank environment and ease into problem-solving. As you progress through each day, the plan systematically delves into key algorithmic topics, offering a detailed breakdown of subtopics for a more thorough exploration.

@iklobato
iklobato / pyenv_install.sh
Last active January 12, 2024 01:46
pyenv linux install
#!/bin/bash
#
# Pyenv Installer Script
#
# This script automates the installation of Pyenv and the latest Python versions
# on a Debian-based system or macOS. It installs necessary dependencies, sets up Pyenv,
# restarts the terminal, and installs the latest Python versions concurrently.
#
# Note: Ensure you have sudo privileges to install system dependencies.
#
@iklobato
iklobato / docker_install.sh
Last active January 5, 2024 02:54
Docker installation on ubuntu, single script
##############################################################################
# Docker Installation Script for Ubuntu #
# #
# Automates the installation of Docker on Ubuntu systems. Checks if Docker #
# is already installed; if not, it proceeds with the installation steps. #
# #
# This script simplifies Docker installation on Ubuntu by updating package #
# lists, installing necessary dependencies like ca-certificates, curl, and #
# gnupg, setting up the Docker repository, and installing Docker CE, #
# Docker CLI, containerd.io, docker-buildx-plugin, and docker-compose-plugin #