This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# deploy-jee: Submits a WAR file and it's md5 file to an SFTP server. | |
# | |
# Copyright © 2015 Antonio Hernández Blas <[email protected]> | |
# 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ./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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Fixes CSV files from DENUE (INEGI), which have some tuples/registers | |
# splitted in two lines. | |
# | |
# Copyright © 2015 Antonio Hernández Blas <[email protected]> | |
# 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns plf.core) | |
(defn isa01 | |
[xs] | |
(map (fn [x] (/ x 2)) xs)) | |
(defn isa02 | |
[xs] | |
(map count xs)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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"} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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]} |