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 / Main.asm
Created November 29, 2016 07:36
Main.asm
title Main
include Irvine32.inc
;;;; Escriba las instrucciones necesarias en lenguaje ensamblador para el algoritmo
;;;; del Cifrado Atbash que opere sobre una palabra:
;;;; Este método consiste en sustituir la primera letra por la última del alfabeto
;;;; que se esté utilizando, la segunda por la penúltima, la tercera por la antepenúltima
;;;; y así sucesivamente con todo el alfabeto. A este método también suele llamársele
;;;; código espejo ya que el cifrado del criptograma es nuevamente el texto en claro.
;;;; Fuente: http://bit.ly/2gbni5U
@nihilismus
nihilismus / get-kernel-patch.sh
Last active November 26, 2016 14:28
Script to download, verify (sha256sum), uncompress and prepare a Linux kernel source tarball.
#!/bin/sh
# Copyright © 2016 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.
me=$(basename $0)
@nihilismus
nihilismus / Main.asm
Created November 25, 2016 01:55
Main.asm
;;;; Main.asm
title Main
include Irvine32.inc
;;;; Escriba las instrucciones necesarias en lenguaje ensamblador para que
;;;; dado un desplazamiento y un mensaje_claro se obtenga un mensaje_cifrado
;;;; a partir de desplazar los caracteres del mensaje_claro tantos caracteres
;;;; a la derecha lo establezca el desplazamiento.
;;;;
@nihilismus
nihilismus / infinality-fonts-local-install.sh
Created November 1, 2016 12:01
infinality-fonts-local-install.sh: install the latest versions available of Infinality fonts in $HOME/.local/share/fonts
#!/bin/bash
# infinality-fonts-local-install.sh: download the latest versions available of
# Infinality fonts: http://bohoomil.com/repo/fonts/
# and install them into $HOME/.local/share/fonts
# 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 / atom-beta-update.sh
Last active June 14, 2016 05:50
atom-beta-update.sh: download & install in openSUSE the latest Beta version of Atom from GitHub
#!/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 18:09
Módulo de JavaScript / XMLHttpRequest, similar al encontrado en https://gist.github.com/nihilismus/ebbf0e1a2dd8e4ef6a8b
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 05:31
Funciones de Orden Superior y Funciones Sobre Colecciones en Clojure haciendo uso de recursividad (first, rest y conj)
(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 16:17
Execute startx automatically in a linux system (/dev/tty1 or Ctrl+Alt+F1)
#!/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 April 3, 2016 18:48
kde5-plasma-antu.sh: install Antü Plasma Suite (KDE) in openSUSE, from it's GitHub repository, inside $HOME.
#!/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 March 25, 2016 04:10
startvnc.sh: starts x11vnc to share the desktop (DISPLAY=:0)
#!/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.