Skip to content

Instantly share code, notes, and snippets.

View jiep's full-sized avatar

José Ignacio Escribano jiep

View GitHub Profile
@jiep
jiep / 0-enunciado.md
Last active October 6, 2021 18:21
Solución al ejercicio de liboqs

Enunciado

Dado el siguiente protocolo de intercambio de clave, que emplea un KEM, definido en [1], se pide:

enunciado

  1. Implementar el protocolo anterior usando un KEM disponible en liboqs.
  2. (Opcional) Compilar el protocolo con una versión de liboqs que incluya sólo el KEM elegido.
  3. (Opcional) Usar la compilación cruzada para compilar el protocolo en Windows.
@jiep
jiep / latex_useful_one-liners.sh
Created January 7, 2021 08:51 — forked from iwishiwasaneagle/latex_useful_one-liners.sh
🧰 Useful CLI one-liners for LaTex
# Show all errors, warnings, and undefined messages in log file after compilation with location in log file for further analysis
grep -iHEn "error|warning|undefined" *.log
# Find all the duplicated labels in a directory
grep -ERh "\\\\label\{\w*:\w*\}" --include="*.tex" | tr -d " " | sort | uniq -c | awk '$1>1 {print $0}'
# Validate references.bib using https://github.com/Pezmc/BibLatex-Check
curl https://raw.githubusercontent.com/Pezmc/BibLatex-Check/master/biblatex_check.py 2>/dev/null | python - -b $(find ./ -maxdepth 1 -name "*.bib" | head -n1) -a $(find ./ -maxdepth 1 -name "*.aux" | head -n1)
# Find all the unused labels
  • Use curl to get the JSON response for the latest release
  • Use grep to find the line containing file URL
  • Use cut and tr to extract the URL
  • Use wget to download it
curl -s https://api.github.com/repos/jgm/pandoc/releases/latest \
| grep "browser_download_url.*deb" \
| cut -d : -f 2,3 \
| tr -d \" \
@jiep
jiep / configure.sh
Last active August 28, 2018 08:00 — forked from lukicdarkoo/configure.sh
Raspberry Pi: AP + client mode
#!/bin/sh
# The script configures simultaneous AP and Managed Mode Wifi on Raspberry Pi Zero W (should also work on Raspberry Pi 3)
# Usage: curl https://gist.githubusercontent.com/lukicdarkoo/6b92d182d37d0a10400060d8344f86e4/raw | sh -s WifiSSID WifiPass APSSID APPass
# Licence: GPLv3
# Author: Darko Lukic <[email protected]>
# Special thanks to: https://albeec13.github.io/2017/09/26/raspberry-pi-zero-w-simultaneous-ap-and-managed-mode-wifi/
MAC_ADDRESS="$(cat /sys/class/net/wlan0/address)"
AP_SSID="${1}"
AP_PASSPHRASE="${2}"
{"elements":{"nodes":[{"data":{"id":"20"}},{"data":{"id":"13"}},{"data":{"id":"1"}},{"data":{"id":"6"}},{"data":{"id":"11"}},{"data":{"id":"5"}},{"data":{"id":"16"}},{"data":{"id":"7"}},{"data":{"id":"12"}},{"data":{"id":"3"}},{"data":{"id":"8"}},{"data":{"id":"15"}},{"data":{"id":"17"}},{"data":{"id":"18"}},{"data":{"id":"4"}},{"data":{"id":"19"}},{"data":{"id":"2"}},{"data":{"id":"9"}},{"data":{"id":"14"}},{"data":{"id":"10"}}],"edges":[{"data":{"source":"13","target":"20","weight":11}},{"data":{"source":"1","target":"20","weight":11}},{"data":{"source":"1","target":"13","weight":11}},{"data":{"source":"6","target":"20","weight":9}},{"data":{"source":"6","target":"13","weight":11}},{"data":{"source":"6","target":"1","weight":7}},{"data":{"source":"11","target":"20","weight":11}},{"data":{"source":"11","target":"13","weight":8}},{"data":{"source":"11","target":"1","weight":8}},{"data":{"source":"11","target":"6","weight":12}},{"data":{"source":"5","target":"20","weight":13}},{"data":{"source":"5","target":"1
@jiep
jiep / competitivitygraph.json
Last active August 29, 2015 14:15
competitivitygraph.json
{"elements":{"nodes":[{"data":{"id":"1"}},{"data":{"id":"2"}},{"data":{"id":"3"}},{"data":{"id":"4"}},{"data":{"id":"5"}},{"data":{"id":"6"}}],"edges":[{"data":{"source":"2","target":"1","weight":1}},{"data":{"source":"3","target":"1","weight":1}},{"data":{"source":"3","target":"2","weight":3}},{"data":{"source":"4","target":"2","weight":2}},{"data":{"source":"5","target":"3","weight":2}},{"data":{"source":"5","target":"4","weight":1}},{"data":{"source":"6","target":"1","weight":1}},{"data":{"source":"6","target":"4","weight":1}},{"data":{"source":"6","target":"5","weight":1}}]}}
{"elements":{"nodes":[{"data":{"id":"Real Madrid"}},{"data":{"id":"Betis"}},{"data":{"id":"Bar\u00e7a"}}],"edges":[{"data":{"source":"Bar\u00e7a","target":"Real Madrid","weight":1}},{"data":{"source":"Bar\u00e7a","target":"Betis","weight":1}}]}}