Skip to content

Instantly share code, notes, and snippets.

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

Tomas Enrique Botalla tbotalla

👷‍♂️
View GitHub Profile
https://askubuntu.com/questions/22381/how-to-format-a-usb-flash-drive
The Command-Line Way
In case you can't get your device formatted from the GUI, try this way.
Open the Terminal (Ctrl + Alt + T)
List your block storage devices by issuing the command lsblk
Then identify your pen drive by it's SIZE. In my case its /dev/sdb
@tbotalla
tbotalla / Pandas Python Cheatsheet
Last active September 23, 2018 23:17
Gist de Referencia con lineas utiles de código al usar Pandas para analisis exploratorio de datos
# Convertir columna a string
total_rows['ColumnID'] = total_rows['ColumnID'].astype(str)
# Eliminar filas cuyo valor para la columna A son nan
df.dropna(subset=['A'])
# Distribucion de valores para una cierta columna
events['city'].value_counts()
# Chequear si una columna tiene algun valor null
@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)
@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 / 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
@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.

@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
import json
import os
import sys
import argparse
import traceback
def json_load_all(buf):
while True:
try:
yield json.loads(buf)

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 / 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;