Skip to content

Instantly share code, notes, and snippets.

@DuqueDeTuring
DuqueDeTuring / cf.txt
Last active May 11, 2021 10:25
curl format: curl -w "@cf.txt" ...
time_namelookup: %{time_namelookup}s\n
time_connect: %{time_connect}s\n
time_appconnect: %{time_appconnect}s\n
time_pretransfer: %{time_pretransfer}s\n
time_redirect: %{time_redirect}s\n
time_starttransfer: %{time_starttransfer}s\n
----------\n
time_total: %{time_total}s\n
@DuqueDeTuring
DuqueDeTuring / configure_nginx_webdav.sh
Last active June 11, 2020 12:30
nginx + webdav ./configure
./configure --with-http_dav_module --with-http_ssl_module --add-module=../nginx-dav-ext-module-master/
nombre_archivo = "blah.xlsx"
wb = Workbook()
ws1 = wb.active
ws1.title = titulo
header = NamedStyle(name="header")
header.font = Font(bold=True)
header.border = Border(bottom=Side(border_style="thin"))
header.alignment = Alignment(horizontal="center", vertical="center")
for i in range(len(columnas)):
@DuqueDeTuring
DuqueDeTuring / ws.py
Last active April 7, 2017 17:26
Python SOAP example using spyne
import logging
logging.basicConfig(level=logging.DEBUG)
from spyne import Application, rpc, ServiceBase, \
Integer, Unicode
from spyne import Iterable
from spyne.protocol.soap import Soap11
@DuqueDeTuring
DuqueDeTuring / gist:7f9dda13916fbd6fceb12903c79f19aa
Created February 25, 2017 16:56
installing gem in user home dir and not global
gem install --user-install gem_name
Check disk for USB stick:
fdisk sdX
Check partitions:
disklabel sdX
mount /dev/sdXUID
Driver
fw_update -p PATH
@DuqueDeTuring
DuqueDeTuring / polinomio.scala
Last active September 11, 2016 14:27
Descubriendo Scala - 1. Programa 1
object Polinomios {
def main(args: Array[String]) {
println("Polinomio:")
val r = scala.util.Random
val grado = 4
val cant_monomios = r.nextInt(grado) + 1
println("\tGrado:" + grado + ", con " + cant_monomios + " monomios.")
@DuqueDeTuring
DuqueDeTuring / gist:b961443d61c68711119f
Created July 6, 2015 20:40
Firefox settings enabled by default that shouldn't
dom.battery.enabled
@DuqueDeTuring
DuqueDeTuring / gist:1d43acd580845d1fb0a3
Created July 4, 2015 03:39
Renombrar index.html a HTMLTITLETAG.html / Rename index.html to HTMLTITLETAG.html
mv index.html "`xmllint --xpath /html/head/title index.html | sed '/^\/ >/d' | sed 's/<[^>]*.//g'`.html"
@DuqueDeTuring
DuqueDeTuring / gist:0d1d98beb3bcb4f3b3a9
Last active August 29, 2015 14:21
Ejemplos en Haskell
-- Generadores y "guardias"
{--
Sea la tupla (x,y) tal que,
x ∈ [1..10] ^ x < 3
y ∈ [11,13] ^ y < 12
--}
[(x,y) | x <- [1..10], y <- [11,13], x<3, y<12]