Skip to content

Instantly share code, notes, and snippets.

View tbotalla's full-sized avatar
👷‍♂️

Tomas Enrique Botalla tbotalla

👷‍♂️
View GitHub Profile
{"version":1,"resource":"file:///home/tbotalla/Documents/Facultad/71.40%20Legislacion%20y%20Ejercicio%20Profesional%20de%20la%20Ingenieria%20Informatica/Legal%20Verano%202023/Final.md","entries":[{"id":"QpUL.md","source":"textFileCreate.source","timestamp":1690329735395},{"id":"CEV5.md","timestamp":1690329738056},{"id":"9XME.md","timestamp":1690329766697},{"id":"ivC7.md","source":"Workspace Edit","timestamp":1690329773474},{"id":"CFFx.md","source":"Workspace Edit","timestamp":1690329787532},{"id":"KAZR.md","timestamp":1690329840365},{"id":"1QM2.md","timestamp":1690329902020}]}
import json
import os
import sys
import argparse
import traceback
def json_load_all(buf):
while True:
try:
yield json.loads(buf)
@tbotalla
tbotalla / PDF417Parser.java
Last active January 16, 2023 14:16
Argentina's DNI parser reading PDF417 code, supports old & new formats
package com.tbotalla.dniparser;
import com.google.zxing.BinaryBitmap;
import com.google.zxing.LuminanceSource;
import com.google.zxing.client.j2se.BufferedImageLuminanceSource;
import com.google.zxing.common.HybridBinarizer;
import com.google.zxing.pdf417.PDF417Reader;
import org.apache.commons.lang3.StringUtils;
import javax.imageio.ImageIO;
@tbotalla
tbotalla / delete-systemd-service.md
Last active April 14, 2020 06:14
Systemd commands on Linux
  • View all services
systemctl 

systemctl list-units --type=service
OR
systemctl --type=service
@tbotalla
tbotalla / curl.md
Created May 7, 2019 01:28 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

# First we need to get the modeline string for xrandr
# Luckily, the tool "gtf" will help you calculate it.
# All you have to do is to pass the resolution & the-
# refresh-rate as the command parameters:
gtf 1920 1080 60
# In this case, the horizontal resolution is 1920px the
# vertical resolution is 1080px & refresh-rate is 60Hz.
# IMPORTANT: BE SURE THE MONITOR SUPPORTS THE RESOLUTION
@tbotalla
tbotalla / ftp-server-configuration.txt
Created March 4, 2019 19:00
Configuracion de un servidor FTP en un una distro basada en Redhat
yum install vsftpd ftp -y
vi /etc/vsftpd/vsftpd.conf
[...]
## Disable anonymous login ##
anonymous_enable=NO
## Uncomment ##
ascii_upload_enable=YES

See git help of a specyfic command

git help stash

Delete old already pushed commits

git reset --hard HEAD~x // Elimina los ultimos x+1 commits
git push -f
@tbotalla
tbotalla / sublime_text_key_bindings.txt
Last active January 21, 2019 17:35
Keymap Sublime Text
[
{ "keys": ["ctrl+shift+f"], "command": "reindent" , "args": { "single_line": false } },
{ "keys": ["ctrl+shift+c"], "command": "toggle_comment", "args": { "block": false } },
{ "keys": ["ctrl+h"], "command": "find_all",
"context": [{"key": "panel", "operand": "find_in_files"}, {"key": "panel_has_focus"}]
},
{ "keys": ["ctrl+h"], "command": "show_panel", "args": {"panel": "find_in_files"} },
{ "keys": ["ctrl+shift+r"], "command": "show_overlay", "args": {"overlay": "goto", "show_files": true} },
]
@tbotalla
tbotalla / Crontab cheatsheet
Last active September 25, 2018 17:34
Comandos para automatizar tareas al iniciar GNU/Linux con Crontab
crontab -e Editar archivo de crontab, crea uno nuevo si no existe
crontab -l Listar tareas crontab
crontab -r Eliminar archivo con las tareas crontab
crontab -v Muestra la ultima vez que se edito el archvio de crontab
* * * * * command to be executed
- - - - -
| | | | |
| | | | +----- day of week (0 - 6) (Sunday=0)
| | | +------- month (1 - 12)