Skip to content

Instantly share code, notes, and snippets.

View ifsnop's full-sized avatar

diego torres ifsnop

View GitHub Profile
@joseluisq
joseluisq / mysql_query_log.md
Last active March 5, 2024 10:50
How to enable the MySQL/MariaDB general query logs

How to enable the MySQL/MariaDB general query logs

  1. Enter to MySQL/MariaDB server command-line tool (change root with your username and password):
mysql -u root -proot
  1. Set the general log file path:
SET GLOBAL general_log_file='/var/log/mysql/mycustom.log';
@smhanov
smhanov / dawg.py
Last active April 26, 2023 16:01
Use a DAWG as a map
#!/usr/bin/python3
# By Steve Hanov, 2011. Released to the public domain.
# Please see http://stevehanov.ca/blog/index.php?id=115 for the accompanying article.
#
# Based on Daciuk, Jan, et al. "Incremental construction of minimal acyclic finite-state automata."
# Computational linguistics 26.1 (2000): 3-16.
#
# Updated 2014 to use DAWG as a mapping; see
# Kowaltowski, T.; CL. Lucchesi (1993), "Applications of finite automata representing large vocabularies",
# Software-Practice and Experience 1993
@pabloalba
pabloalba / subDownload.groovy
Created January 12, 2013 19:53
Script para descargar automáticamente subtítulos de subtitulos.es. Hace un poco de web scraping para obtener el último subtítulo en inglés, que descarga con wget.
#!/usr/bin/groovy
//http://www.subtitulos.es/ajax_loadShow.php?show=1493&season=1
def shows = [
[id:1493, season:1, directory:"/media/data/Arrow"],
[id:382, season:4, directory:"/media/data/Modern.Family"]
]