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 / output-error.md
Last active December 27, 2015 00:59
SlackBuilds with problems of $OUTPUT
root@localhost:~# find /usr/ports/14.0 -iname "*.SlackBuild" \
  -exec grep -HE '^mkdir.*TMP.*PKG.*' {} \; | grep -v OUTPUT | sort

/usr/ports/14.0/audio/ario/ario.SlackBuild:mkdir -p $TMP $PKG
/usr/ports/14.0/audio/gmpc-plugins/gmpc-plugins.SlackBuild:mkdir -p $TMP $PKG
/usr/ports/14.0/audio/nero-aac/nero-aac.SlackBuild:mkdir -p $TMP $PKG
/usr/ports/14.0/business/ledger/ledger.SlackBuild:mkdir -p $TMP $PKG/usr
/usr/ports/14.0/desktop/cairo-dock-plugins/cairo-dock-plugins.SlackBuild:mkdir -p $TMP $PKG $OUPUT
/usr/ports/14.0/desktop/cairo-dock/cairo-dock.SlackBuild:mkdir -p $TMP $PKG $OUPUT
@nihilismus
nihilismus / configure.log
Last active December 30, 2015 18:29
Build error with virtualbox in Slackware64 14.1: libcurl not found at -lcurl or libcurl headers not found
# 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 *****
@nihilismus
nihilismus / rc.vde2-switch1.sh
Last active December 31, 2015 14:29
init script for vde_switch+dnsmasq+NAT / Slackware Linux
#!/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 / pg_dev.sh
Created December 17, 2013 07:06
shell script for a personal PostgreSQL instance / Slackware Linux
#!/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 / .chrb.mksh
Last active December 31, 2015 14:39
An mksh wrapper function for chruby and ruby-build
# $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 / conky-cmus.py
Last active December 12, 2020 11:49
A Python script to get artist, album and title from cmus and send it to stdout. Useful for conky
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# For conky's configuration file ($HOME/.conkyrc):
# ${if_running cmus}
# ${execi 03 (conky-cmus.py)}
# ${endif}
from subprocess import check_output
from re import match, compile
@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 / xrandr-qemu.sh
Created April 7, 2015 01:00
xrandr command for a gnu/linux virtual machine in qemu with -display=gtk
#!/bin/sh
# Based on https://wiki.archlinux.org/index.php/Xrandr#Adding_undetected_resolutions
# For a gnu/linux virtual machine in qemu with -display=gtk
mode="$(cvt 1280 720 | tail -1 | sed 's/Modeline //')"
xrandr --newmode $mode
mode="$(cvt 1280 720 | tail -1 | sed 's/Modeline //' | sed 's/ .*//')"
@nihilismus
nihilismus / 1st-example-of-output.txt
Last active August 29, 2015 14:19
script to search for missing packages using ldd, objdump and slackpkg.
root@slackware-current: cat missing-packages.log
Searching with ldd...
/usr/bin/capinfos [wireshark-1.12.2-x86_64-1_hba] => libgcrypt.so.11 [?]
/usr/bin/capinfos [wireshark-1.12.2-x86_64-1_hba] => libgcrypt.so.11 [?]
/usr/bin/capinfos [wireshark-1.12.2-x86_64-1_hba] => libgcrypt.so.11 [?]
/usr/bin/captype [wireshark-1.12.2-x86_64-1_hba] => libgcrypt.so.11 [?]
/usr/bin/captype [wireshark-1.12.2-x86_64-1_hba] => libgcrypt.so.11 [?]
/usr/bin/dftest [wireshark-1.12.2-x86_64-1_hba] => libgcrypt.so.11 [?]
/usr/bin/dftest [wireshark-1.12.2-x86_64-1_hba] => libgcrypt.so.11 [?]
/usr/bin/dftest [wireshark-1.12.2-x86_64-1_hba] => libgcrypt.so.11 [?]
#!/bin/sh
# Converts http://www.nirsoft.net/countryip/mx.csv
# into a rules of tcpdump
#
# 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.