Skip to content

Instantly share code, notes, and snippets.

View asdkant's full-sized avatar

Ariel Kanterewicz asdkant

  • Baufest
  • Buenos Aires, Argentina
View GitHub Profile
@asdkant
asdkant / decalogo-whatsappero.md
Last active July 6, 2023 19:54
Decálogo del buen WhatsApp-ero

Decálogo del buen WhatsApp-ero

  1. Si enviás una pregunta por WhatsApp, y ves que tu contacto está tipeando, es una buena práctica esperar a su respuesta antes de enviar una segunda pregunta, o más texto.

  2. Es mucho mejor enviar en un único mensaje algo del estilo "Hola, cómo estás? Cómo viene tu día?", que en 20 mensajes de una palabra por cada uno de ellos, recordemos que cada mensaje de seguro le generará, a tu aún amigo, un sonido y también muy posiblemente una vibración. 20 avisos seguidos de vibraciones predispone mal a la gente, y su respuesta puede no ser amistosa luego de esa acción.

  3. Si decidís enviar una obra literaria extensa por medio de un único mensaje de WhatsApp, te recordamos que no es muy cómodo hacer scroll de la pantalla 1200 veces para leer desde la primera a la última palabra. Éste sería el caso contrario al 2), y también ocurriría que o el contacto no lo lea, o que cuando lances la pregunta "Qué te pareció?" recibas una mentira o la nada misma.

  4. El ser humano no es un dispara

@asdkant
asdkant / varcheck.py
Last active November 17, 2021 23:33
Small example on "global" variables and passing things "as reference"
from sys import exit
from textwrap import fill as tw
fail = [False]
def varcheck(var_name, var_value, optional = False):
is_empty = len(var_value) == 0
if optional:
symbol = "🔲"
elif is_empty or "$(" in var_value:
@asdkant
asdkant / rdr-time.py
Created January 19, 2021 01:54
add timestamp to RAW filenames (and XMP sidecars if present)
#!/usr/bin/python
import sys
import pyexiv2
import os
# print(sys.argv)
if sys.argv[1] == "-d":
files = sys.argv[2:]
realrun = False
@asdkant
asdkant / find_raw_dupes.py
Created January 19, 2021 01:45
Find duplicate raw files (works on Linux)
#!/usr/bin/python
import sys
from sys import argv
import pyexiv2
import os
from progress.bar import IncrementalBar
help_message = f"""Find duplicate images in a list provided (using metadata)
Usage:
@asdkant
asdkant / gist:a6f2598c5498ef1efc9ef8a9ffd6a002
Last active December 29, 2020 19:43
LTN green circuit production station - Brian's Trains friendly
0eNrsvetuXDmyNfgqA/+ai1WzeScLM/MU82OAhlGQ7WyXcGRJI8uN0/hQ7z6Zum4rGTvXWnHK5fKcP9WoUvYKMsgIcgdXRPyPN+8vv+5ubi+u7n57f339H29+/R8v/+XLm1//sfrXw9++XJ3fnN1dn326vfh4+Pf/fPNrCMvbN/++/98/3r45f//l+vLr3e7s8Mubi6tPb369u/26e/vm4sP11QPgl4tPV+eXh//33b9vdm9+fXNxt/v85u2bq/PPh3+7vP508eXu4sPZ3e35xdXZl7vrmzd74Iurj7uDtD/enkTYXe4+3N1eX+0xPlzcfvh6cbcCiH+8e/tmd3V3cXexexjP/b/8+7err5/f7273Ep5x9vIvzz78fj+KB4lv39xcf9n/P6+vHid/Flv/pdzPP4Vfyl7Mx4vbvfT7X8TDWF+hRxI9U+iJRA8UembQC4ddKOxCYVcKm1vP9oz94evtv3Yfzw4iZrru8QE1f4tZJ5j9GfPLwQY+/X5norb2gJpOj3QQqAVGPRg/DJtw2IDqtfapXtMMNGKgucNLFRI6/UJMPsOgxEIVGBTfU6FiGq0RX6SGb6j+OP32LWybwRJGVeewYQYLW1XGxxphmyJGGgOh18cdMICxRh62nd4FMRHLlaawZQabedgB6Ba2rZxwzVYWFNErbF214VrtLCii08HdZcbydG6P1+f2DD4R51Yf98A5nF60FGjY18qYLVsirKyGKexs4VKiYV8rYarbzC1dGebSTZVB3RXT4PYFbnUB3xWNBIX2BG51A98RgwRF9kNemAVrC7UbMmFx43HJ0ukly5GHDcBok/j9l7EvNOJ8K/MFnO2KXHjYBOwL2NbSwBeusaDIsnXp8xRcNNjmWoCXrCwsKLBghbG1h0tJLqeXrEQeNp1etJLgb/OHCFYGPvhKpj+jM/AhVQo61jYf61QBlTDbNh3rdGs1HhY4eUtHVXBYgwNoBbbWwEDTHHIaTYItKzXYBGpgQQEDqGC8o+DbvyYyNIFs/prBKAK
@asdkant
asdkant / update-pkgbuild
Created December 17, 2020 22:33
script to check if factorio-experimental is up to date in Arch (or manjaro or similar)
#!/bin/bash
curl "https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=factorio-experimental" > PKGBUILD
INSTALLEDVER=`pacman -Qi factorio-experimental | grep Version | egrep -o '[0-9]\.[0-9]\.[0-9]'`
MAKEVER=`egrep '^pkgver\=[0-9]\\.[0-9]\\.[0-9]' PKGBUILD | egrep -o '[0-9]\.[0-9]\.[0-9]'`
if [[ $INSTALLEDVER == $MAKEVER ]]; then
echo "👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍"
echo "👍 Factorio is up to date =) 👍"
@asdkant
asdkant / band-ruiner.py
Created November 22, 2020 18:26
Band ruiner
#!/usr/bin/python
from nltk.corpus import words
import numpy as np
from pyxdameraulevenshtein import (
damerau_levenshtein_distance_ndarray as distance_list)
from sys import argv
victim = " ".join(argv[1:]).lower()
wl = [w.lower() for w in words.words()]
@asdkant
asdkant / we-atent-dead-advice.txt
Created August 30, 2020 15:34
Advice from "We Ate'nt Dead"
"Harder" is a horrible safe word.
%
Never take a laxative and a sleeping pill at the same time
%
Don't not do that again.
%
Never ask your ouija board for recipes.
%
Don't shove beans up your nose.
%
@asdkant
asdkant / az-spn.sh
Created July 30, 2019 16:19
If you have a gazillion SPNs for azure CLI...
#!/bin/bash
# az-spn
tenant='tenant id' # in my use case I have a single tenant
declare -A dic
dic['joes dev sub']='subscription name or id'
dic['joes dev id']='SPN ID'
dic['joes dev pass']='SPN password'
@asdkant
asdkant / corporate-toolkit
Created July 18, 2019 15:12
Corporate toolkit
This is a useful list of programs to use on corporate laptops running windows. They shoul make the experience a bit more bearable.
Process Explorer: have a better understanding on what the hell is running on your machine
https://docs.microsoft.com/en-us/sysinternals/downloads/process-explorer
Autoruns: when you have to disable stuff from the system startup
https://docs.microsoft.com/en-us/sysinternals/downloads/autoruns
Chocolatey: better way to install software
https://chocolatey.org