Skip to content

Instantly share code, notes, and snippets.

@jartigag
jartigag / spec.json
Created November 22, 2021 23:23
lichess_eval_games
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"width": 600,
"height": 400,
"data": {
"url": "https://api.tinybird.co/v0/sql?q=SELECT%20toStartOfDay(date)%2Ccount(*)%20FROM%20lichess_2020_eval_games%20group%20by%20toStartOfDay(date)%20order%20by%20toStartOfDay(date)%20desc%20%0A%20FORMAT%20CSVWithNames&token=p.eyJ1IjogIjNjYTZlNjZkLTBkZmItNGU4MS1hYWYyLWE5Y2QyMTA2NzVjNiIsICJpZCI6ICIxMTcwMzJiNS03N2Q1LTQ3NjEtODVhYy1lZTVkMWJiYzYyOTIifQ.dp6TJBEfgh-I_BS7DSxxTd-icd1Oyam4hg3yTXAde7w&pipeline=rango_temporal_datos_1563_copy",
"format": {
"type": "csv",
"parse": {
"count()": "number"
@jartigag
jartigag / hackmd2writeup.py
Last active November 13, 2021 18:30
hackmd2writeup.py
#!/usr/bin/env python3
#
# this script adapts a hackmd note **including images** to the Scavenger's writeup style:
# https://scavengersecurity.com/
# usage and output:
# $ ./hackmd2writeup.py test.md
# OR
# $ ./hackmd2writeup.py hb5VSfHnQNKbdHbOCftmCA
# [+] __mandatory fields__:
@jartigag
jartigag / exportOPMLWithTags.py
Last active October 24, 2020 10:49
export ~/.newsboat/urls including tags
#!/usr/bin/env python3
# this script exports the urls file to OPML, including tags. for that, all feeds must have only one tag
#usage: ./exportOPMLWithTags.py urls > urls.opml
#requeriments (just to get the title from a rss feed if it isn't cached in newsboat):
# pip install feedparser
#input-output example:
# Después de instalar debian-kde o kubuntu (más ligero sin LibreOffice),
# Utilidades #
sudo apt install git curl vim net-tools htop tree gawk wmctrl openssh-server filelight gimp wireshark chromium-browser -y
#Extensiones: "HTTPS Everywhere" "uBlock Origin" ¿"Stylus"? ¿"Vimium"?
#Multimedia: sudo apt install vlc audacity musescore kdenlive -y
#Otros: sudo apt install pass nmap kdeconnect
sudo apt install telegram-desktop
# Mis Dotfiles #
#!/bin/bash
let upSeconds="$(/usr/bin/cut -d. -f1 /proc/uptime)"
let secs=$((${upSeconds}%60))
let mins=$((${upSeconds}/60%60))
let hours=$((${upSeconds}/3600%24))
let days=$((${upSeconds}/86400))
UPTIME=`printf "%d days, %02dh%02dm%02ds" "$days" "$hours" "$mins" "$secs"`
# get the load averages
read one five fifteen rest < /proc/loadavg
@jartigag
jartigag / init-config.sh
Last active June 4, 2019 18:29
init-config [ bash <(wget -O https://git.io/fN5CH) ]
su
apt install curl wget apt-transport-https dirmngr
wget http://www.deb-multimedia.org/pool/main/d/deb-multimedia-keyring/deb-multimedia-keyring_2016.8.1_all.deb && dpkg -i deb-multimedia-keyring_2016.8.1_all.deb
wget -nv https://download.opensuse.org/repositories/network:messaging:xmpp:dino/Debian_9.0/Release.key -O Release.key && apt-key add - < Release.key && rm Release.key
wget -q -O - http://download.opensuse.org/repositories/home:/ivaradi/Debian_9.0/Release.key | apt-key add -
apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys EFDC8610341D9410
wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | apt-key add -
sources="#------------------------------------------------------------------------------#
# OFFICIAL DEBIAN REPOS
#------------------------------------------------------------------------------#