Skip to content

Instantly share code, notes, and snippets.

View nihilismus's full-sized avatar

Antonio Hernández Blas nihilismus

View GitHub Profile
@nihilismus
nihilismus / deploy-jee.sh
Created October 18, 2015 17:12
deploy-jee: Submits a WAR file and it's md5 file to an SFTP server.
#!/bin/sh
# deploy-jee: Submits a WAR file and it's md5 file to an SFTP server.
#
# Copyright © 2015 Antonio Hernández Blas <hba.nihilismus@gmail.com>
# This program is free software. It comes without any warranty, to
# the extent permitted by applicable law. You can redistribute it
# and/or modify it under the terms of the Do What The Fuck You Want
# To Public License, Version 2, as published by Sam Hocevar. See
# http://www.wtfpl.net/ for more details.
var E = (function() {
var _f1 = function(v) {
var vocal_siguiente = {
"a": "e",
"e": "i",
"i": "o",
"o": "u",
"u": "a"
};
if (vocal_siguiente[v] === undefined) {
@nihilismus
nihilismus / idea-jdk-8.60-slackware-current.log
Created September 6, 2015 16:03
Intellij IDEA 14.1.4 / Slackware -current -full / JDK 8u60-i586
$ ./idea.sh
Java HotSpot(TM) Server VM warning: ignoring option MaxPermSize=250m; support was removed in 8.0
java.lang.RuntimeException: cannot load system cursor: CopyDrop.32x32
at sun.awt.X11.XToolkit.lazilyLoadDesktopProperty(XToolkit.java:1541)
at java.awt.Toolkit.getDesktopProperty(Toolkit.java:1803)
at java.awt.dnd.DragSource.load(DragSource.java:131)
at java.awt.dnd.DragSource.<clinit>(DragSource.java:148)
at com.intellij.ide.dnd.DnDManagerImpl.registerSource(DnDManagerImpl.java:98)
at com.intellij.ide.dnd.DnDSupport.<init>(DnDSupport.java:70)
at com.intellij.ide.dnd.DnDSupport.<init>(DnDSupport.java:32)
@nihilismus
nihilismus / missing-packages-after-rebuild-mesa.log
Last active August 29, 2015 14:27
Missing packages / Dependencies problems in Slackware -current Fri Aug 21 21:17:48 UTC 2015
Searching with ldd...
/usr/bin/dftest [wireshark-1.12.2-x86_64-1_hba] => libgnutls.so.28 [?]
/usr/bin/dftest [wireshark-1.12.2-x86_64-1_hba] => libnettle.so.4 [?]
/usr/bin/dftest [wireshark-1.12.2-x86_64-1_hba] => libhogweed.so.2 [?]
/usr/bin/ffmpeg [ffmpeg-2.6.3-x86_64_custom-1_hba] => libgnutls.so.28 [?]
/usr/bin/ffplay [ffmpeg-2.6.3-x86_64_custom-1_hba] => libgnutls.so.28 [?]
/usr/bin/ffprobe [ffmpeg-2.6.3-x86_64_custom-1_hba] => libgnutls.so.28 [?]
/usr/bin/ffserver [ffmpeg-2.6.3-x86_64_custom-1_hba] => libgnutls.so.28 [?]
/usr/bin/gtk3-widget-factory [gtk+3-3.16.6-x86_64-1] => libcanberra-gtk3.so.0 [libcanberra-0.30-x86_64-1]
/usr/bin/gtk3-widget-factory [gtk+3-3.16.6-x86_64-1] => libcanberra.so.0 [libcanberra-0.30-x86_64-1]
#!/bin/sh
# Fixes CSV files from DENUE (INEGI), which have some tuples/registers
# splitted in two lines.
#
# Copyright © 2015 Antonio Hernández Blas <hba.nihilismus@gmail.com>
# This program is free software. It comes without any warranty, to
# the extent permitted by applicable law. You can redistribute it
# and/or modify it under the terms of the Do What The Fuck You Want
# To Public License, Version 2, as published by Sam Hocevar. See
# http://www.wtfpl.net/ for more details.
@nihilismus
nihilismus / SF.js
Last active August 29, 2015 14:25
Ordinario 1
var SF = (function() {
/*
* Entrada:
* f1(5, 3)
* Dos números cualesquiera: x e y.
*
* Salida:
* [[5, 15], [3, 9]]
* Dos arreglos anidados con dos elementos: el primero x u y, y el
* segundo su triple.
@nihilismus
nihilismus / test.php
Created May 31, 2015 03:56
Ejemplo de uso de pgsql y pdo_pgsql
// Módulo pgsql:
<?php
$c_pgsql = pg_connect("host=127.0.0.1 user=alu12345 password=12345 dbname=bd12345 port=1111");
$r_pgsql = pg_query($c_pgsql, "select version()");
$r = pg_fetch_assoc($r_pgsql);
echo $r['version'];
?>
// Módulo pdo_pgsql:
(ns plf.core)
(defn isa01
[xs]
(map (fn [x] (/ x 2)) xs))
(defn isa02
[xs]
(map count xs))
(ns prueba.main)
(def alumnos
[{:nombre "A"
:apellidos {:paterno "AA" :materno "AAA"}
:sexo "m"
:numero-de-control "12345"
:calificaciones [80 70 80]}
{:nombre "B"
:apellidos {:paterno "BB" :materno "BBB"}
(ns prueba.main)
(def alumnos
[{:nombre "A" :numero-de-control "12345" :calificaciones [80 70 80]}
{:nombre "B" :numero-de-control "23456" :calificaciones [90 70 0]}
{:nombre "C" :numero-de-control "34567" :calificaciones [100 70 70]}
{:nombre "D" :numero-de-control "45678" :calificaciones [100 100 90 90 70 70 80 80]}
{:nombre "E" :numero-de-control "56789" :calificaciones [100 70 70]}
{:nombre "F" :numero-de-control "67890" :calificaciones [100 90 100]}
{:nombre "G" :numero-de-control "78901" :calificaciones [100]}