Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python3
import argparse
import difflib
import enum
import os
import re
import sys
from os import path
from urllib import parse
@ldotlopez
ldotlopez / userContent.css
Last active October 18, 2020 11:51
No comments CSS
/*
* Copyright (C) 2019 Luis López <luis@cuarentaydos.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
@ldotlopez
ldotlopez / trace-time.sh
Last active October 2, 2017 13:03
Tracking time with one-shot funcion
function __trace_time () {
# Call this function to trace how much time spends your code
# Ex:
#
# #!/bin/bash
#
# source /path/to/time-track.sh
#
# __trace_time # First call initalizes some variables and checks,
# # this is T-0 point
@ldotlopez
ldotlopez / keybase.md
Created March 17, 2017 09:41
Keybase

Keybase proof

I hereby claim:

  • I am ldotlopez on github.
  • I am doblelopez (https://keybase.io/doblelopez) on keybase.
  • I have a public key ASAtrw3zfHlawr2K-ck54LxgvVSLydEOcNG7lgHulwtVXAo

To claim this, I am signing this object:

import asyncio
import time
from concurrent import futures
loop = asyncio.get_event_loop()
loop.set_debug(True)
#!/usr/bin/python
import os
import sys
import argparse
import datetime
from pyexiv2 import ImageMetadata
class MetadataFailed(Exception): pass
@ldotlopez
ldotlopez / ldot-flac2mp3.sh
Last active December 15, 2015 06:59
Q&D flac2mp3 to be used with cron.
#!/bin/bash
# Configurables
LOC="${LOC:-$1}" # You can set LOC via env variable or argument
FLAC_BIN="${FLAC_BIN:-flac}"
METAFLAC_BIN="${METAFLAC_BIN:-metaflac}"
LAME_BIN="${LAME_BIN:-lame}"
ID3_BIN="${ID3_BIN:-id3tag}"
V="${V:-true}" # set to echo to enable debug
W="${W:-true}" # set to echo to enable warnings