Skip to content

Instantly share code, notes, and snippets.

View zodman's full-sized avatar
🤗
Code wins arguments!

Andres Vargas zodman

🤗
Code wins arguments!
View GitHub Profile
@zodman
zodman / diff
Created February 19, 2026 02:39
irgramd patch
diff --git a/irgramd b/irgramd
old mode 100644
new mode 100755
diff --git a/telegram.py b/telegram.py
index 39e02aa..8d727e3 100644
--- a/telegram.py
+++ b/telegram.py
@@ -15,57 +15,74 @@ import asyncio
import collections
import telethon
@zodman
zodman / .tmux.conf
Created February 13, 2026 15:41 — forked from AllanChain/.tmux.conf
oh my tmux nord theme.
tmux_conf_theme_colour_1="#2e3440" # dark gray
tmux_conf_theme_colour_2="#3b4252" # gray
tmux_conf_theme_colour_3="#4c566a" # light gray
tmux_conf_theme_colour_4="#5e81ac" # light blue
tmux_conf_theme_colour_5="#ebcb8b" # yellow
tmux_conf_theme_colour_6="#2e3440" # dark gray
tmux_conf_theme_colour_7="#e5e9f0" # white
tmux_conf_theme_colour_8="#2e3440" # dark gray
tmux_conf_theme_colour_9="#ebcb8b" # yellow
tmux_conf_theme_colour_10="#d08770" # pink
@zodman
zodman / server.js
Created February 6, 2025 18:30 — forked from dlukes/server.js
Pattern for using Promise-based background jobs in Node + Express.
/* A quick reminder on how to use Promises with Node and Express in order to run potentially
* time-consuming jobs asynchronously (assuming the jobs are able to run in the background thanks to
* libuv and actually return Promises).
*
* Start the server, navigate to /startjob, then refresh a few times, the job should be in progress.
* You can navigate elsewhere in the "app" in other browser tabs in the meanwhile (/). After about
* 20s, you should get a result by refreshing the tab where you originally submitted the job.
*
* I hope this pattern will be useful e.g. for processing images with the `sharp` library (see
* <http://sharp.dimens.io>).
/* eslint-disable @typescript-eslint/ban-types */
// @ts-nocheck
/**
* Use to patch all functions/methods in a class and make them print out run time
* in ms to the console.
*
* This decorator will only patch functions declared in the target class.
* It will **not** patch functions reside in the **base class**.
* Dynamically created functions or functions received from the outside as input
@zodman
zodman / jira-list
Created July 15, 2022 03:05
jira list tmp
#!/bin/env python
"""
use the api token from jira: https://id.atlassian.com/manage-profile/security/api-tokens
# add to ~/.bashrc
export JIRA_API_TOKEN=""
export JIRA_USER=""
export JIRA_URL="https://myjira.atlassian.net/"
@zodman
zodman / run.bash
Last active July 3, 2025 20:43
Dokku clamav running with scan virus as a service with api rest
##
# this script born about the needs of implement a virus scanner for files using a api rest.
# then using https://github.com/benzino77/clamav-rest-api/ and https://dokkupose.netlify.app
# I create this script to deploy the api rest
##
### dokku apps:destroy clamav-service && dokku apps:destroy clamav-apirest && dokku network:destroy clamav-net
# Let's create a network bridge to communicate
dokku apps:create clamav-service
@zodman
zodman / FDFParser.py
Created October 21, 2021 16:35 — forked from lizettepreiss/FDFParser.py
How to parse a .fdf file in Python. The intention was to export comments I'd made in a .pdf (using Adobe Reader DC's commenting capability) and make them available elsewhere to use as a basis for further notes.
from pdfminer.pdfparser import PDFParser
from pdfminer.pdfdocument import PDFDocument
from pdfminer.pdftypes import resolve1
# I exported the comments I had made in an Adobe Reader DC document to f:temp/stn.fdf.
# Now I wanted to access those comments outside of the Adobe Reader. Here is how I extracted the comments.
fdf_file = open("F:/temp/stn.fdf", 'rb')
[
{
"objectId": "hKljil8WpZ",
"ProgrammingLanguage": "@Formula",
"Source": "http://en.wikipedia.org/wiki/Formula_language",
"createdAt": "2020-02-06T16:22:51.408Z",
"updatedAt": "2020-02-06T16:22:51.408Z"
},
{
"objectId": "chpqVvCNF3",
@zodman
zodman / store-secrets-githubactions .py
Created October 30, 2020 19:11
store github secrets from env enviroment
import sys
from dotenv import dotenv_values
"""
# pip install python-dotenv
# using https://github.com/anomaly/github-secrets-cli
main.py .secretsenv org repo | bash
"""
def main():
e =dotenv_values(dotenv_path=sys.argv[1])
@zodman
zodman / bluetooth.ps1
Last active September 16, 2025 21:26
Enable and disable bluetooth windows by powershell cli ! usefull to sync you airphones
[CmdletBinding()] Param (
[Parameter(Mandatory=$true)][ValidateSet('Off', 'On')][string]$BluetoothStatus
)
If ((Get-Service bthserv).Status -eq 'Stopped') { Start-Service bthserv }
Add-Type -AssemblyName System.Runtime.WindowsRuntime
$asTaskGeneric = ([System.WindowsRuntimeSystemExtensions].GetMethods() | ? { $_.Name -eq 'AsTask' -and $_.GetParameters().Count -eq 1 -and $_.GetParameters()[0].ParameterType.Name -eq 'IAsyncOperation`1' })[0]
Function Await($WinRtTask, $ResultType) {
$asTask = $asTaskGeneric.MakeGenericMethod($ResultType)
$netTask = $asTask.Invoke($null, @($WinRtTask))
$netTask.Wait(-1) | Out-Null