Skip to content

Instantly share code, notes, and snippets.

Antonio Hernández Blas nihilismus

Block or report user

Report or block nihilismus

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@nihilismus
nihilismus / atom-beta-update.sh
Last active Jun 14, 2016
atom-beta-update.sh: download & install in openSUSE the latest Beta version of Atom from GitHub
View atom-beta-update.sh
#!/bin/bash
# atom-beta-update.sh: download the latest Beta version of Atom from
# GitHub: https://atom.io/beta
# Copyright © 2016 Antonio Hernández Blas <hba.nihilismus@gmail.com>
# This work is free. 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 / XHR.js
Created May 22, 2016
Módulo de JavaScript / XMLHttpRequest, similar al encontrado en https://gist.github.com/nihilismus/ebbf0e1a2dd8e4ef6a8b
View XHR.js
var XHR = (function() {
var _get = function(_url, _en_caso_de_exito, _en_caso_de_error) {
var _detectar_cambios_de_estado = function(_xhr, _en_caso_de_exito, _en_caso_de_error) {
return function() {
if (_xhr.readyState === 4) {
if (_xhr.status >= 200 && _xhr.status <= 299) {
_en_caso_de_exito(_xhr);
} else {
_en_caso_de_error(_xhr);
}
@nihilismus
nihilismus / fos.clj
Last active May 20, 2016
Funciones de Orden Superior y Funciones Sobre Colecciones en Clojure haciendo uso de recursividad (first, rest y conj)
View fos.clj
(def lmap (fn [f xs]
(letfn [(g ;; Función Recursiva (FR): recorre la LO para regresar la LA conformada con los resultados
;; obtenidos de aplicar la FA sobre cada E en la LO.
;; Elemento (E): es cada valor (val) en la LO
;; '(valor1 valor2 valorN)
[ys ;; Lista Original (LO) o Lista de Entrada (LE)
zs ;; Lista de Acumulación (LA) o Lista de Salida (LS)
h ;; Función a Aplicar (FA)
]
(if (nil? (first ys))
@nihilismus
nihilismus / startx-linux-tty1.sh
Created May 15, 2016
Execute startx automatically in a linux system (/dev/tty1 or Ctrl+Alt+F1)
View startx-linux-tty1.sh
#!/bin/bash
# sdm.sh : Start X **automagically** when login-in /dev/tty1
#
# Add the execution of this script, or the next lines, at the
# end of ~/.bashrc or ~/.bash_profile
TTY="$(/usr/bin/tty | sed 's:.*/::')"
if [[ ! ${DISPLAY} && ${TERM} == 'linux' && ${TTY} == 'tty1' ]]; then
unset TTY
exec startx
@nihilismus
nihilismus / kde5-plasma-antu.sh
Last active Apr 3, 2016
kde5-plasma-antu.sh: install Antü Plasma Suite (KDE) in openSUSE, from it's GitHub repository, inside $HOME.
View kde5-plasma-antu.sh
#!/bin/sh
# kde5-plasma-antu.sh: install/update Antü Plasma Suite [1], an
# "elegant Alternative Suite for Plasma 5" by Fabián Alexis.
#
# The installation is made inside $HOME/.local/share.
#
# This script was tested only in:
# $ cat /etc/os-release
# NAME=openSUSE
@nihilismus
nihilismus / startvnc.sh
Created Mar 25, 2016
startvnc.sh: starts x11vnc to share the desktop (DISPLAY=:0)
View startvnc.sh
#!/bin/sh
# startvnc.sh: starts x11vnc to share the desktop (DISPLAY=:0).
# Use -f to force stop and start a new instance of x11vnc.
# Copyright © 2016 Antonio Hernández Blas <hba.nihilismus@gmail.com>
# This work is free. 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 / .chrb.mksh
Last active Dec 31, 2015
An mksh wrapper function for chruby and ruby-build
View .chrb.mksh
# $HOME/.chrb.mksh
# chrb = (chruby + ruby-build) / mksh
#
# Copyright © 2013 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 / pg_dev.sh
Created Dec 17, 2013
shell script for a personal PostgreSQL instance / Slackware Linux
View pg_dev.sh
#!/bin/sh
# About: shell script for a personal PostgreSQL instance / Slackware Linux
# Copyright © 2013 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 / rc.vde2-switch1.sh
Last active Dec 31, 2015
init script for vde_switch+dnsmasq+NAT / Slackware Linux
View rc.vde2-switch1.sh
#!/bin/sh
# About: init script for vde_switch+dnsmasq+NAT / Slackware Linux
# Copyright © 2013 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 / configure.log
Last active Dec 30, 2015
Build error with virtualbox in Slackware64 14.1: libcurl not found at -lcurl or libcurl headers not found
View configure.log
# Log file generated by
#
# './configure --disable-kmods --disable-pulse --enable-vde --enable-vnc --enable-hardening --disable-java'
#
***** Checking environment *****
Determined build machine: linux.amd64, target machine: linux.amd64
***** Checking kBuild *****
You can’t perform that action at this time.