Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

José L. Ortiz bandaangosta

🏠
Working from home
View GitHub Profile
@bandaangosta
bandaangosta / kibana_csv_jira.sh
Last active October 18, 2019 13:07
Kibana search results (exported to CSV) to JIRA table format
View kibana_csv_jira.sh
# !/bin/bash
# Steps:
# - Run query in Kibana
# - Export results to CSV file: Share -> CSV Reports -> Generate CSV
# (you may be required to "Save search" first. Use a temporary name and keep overwriting it to reduce entries)
# - Download generated CSV once generated (it takes a short while)
# - Run script on local file as shown below
# - Profit
#
@bandaangosta
bandaangosta / pzem_004t.py
Last active December 18, 2022 08:31
Reading PZEM-004t power sensor (new version v3.0) through Modbus-RTU protocol over TTL UART
View pzem_004t.py
# Reading PZEM-004t power sensor (new version v3.0) through Modbus-RTU protocol over TTL UART
# Run as:
# python3 pzem_004t.py
# To install dependencies:
# pip install modbus-tk
# pip install pyserial
import serial
import modbus_tk.defines as cst
@bandaangosta
bandaangosta / docker_logs_size.py
Last active March 1, 2019 13:35
Print Docker containers log size
View docker_logs_size.py
#! /usr/bin/env python3
# Print Docker containers log size
# Needs to 'pip install docker' first
#
# $ sudo ./docker_logs_size.py
# 658675d834 reverse-proxy_1: 10.31 KB
# 85f65ece1d webroot_1: 13.1 KB
# 34c6cc54ab redis_1: 18.81 KB
# 05a3c8b895 mysql_8.0_1: 48.69 KB
@bandaangosta
bandaangosta / battery_notify.sh
Created October 20, 2018 13:20
Bash script for low battery alarm and notification
View battery_notify.sh
#!/bin/bash
# From: https://forums.linuxmint.com/viewtopic.php?f=90&t=217741
# Credits to user BlackVeils
# Steps:
# 1. Save this script to battery_notify.sh
# 2. Edit the 'alarm' variable to point to your sound file of choice
# 3. Give execution permission: chmod +x battery_notify.sh
# 4. Run the script to test it. If happy, add to your startup applications.
@bandaangosta
bandaangosta / sspd.py
Created July 15, 2017 14:25 — forked from tbuckl/sspd.py
pandas utils for smartsheets
View sspd.py
from smartsheet import *
import pandas as pd
from credentials import smartsheet_token
smartsheet = smartsheet.Smartsheet(smartsheet_token)
def get_sheet_as_df(sheet_id):
ss1 = smartsheet.Sheets.get_sheet(sheet_id, page_size=0)
row_count = ss1.total_row_count
ss1 = smartsheet.Sheets.get_sheet(sheet_id, page_size=row_count)