Mindblown: a blog about philosophy.

  • `Unrecognized option ‘preset’` in avconv/ffmpeg+x264

    This is because libx264 or the extra codecs are not installed. Install with {{{ #1ang=bash sudo apt-get install -y x264 libx264-123 libx264-dev libavcodec-extra-53 }}}

  • Median and Quartiles – Python

    [[[TOC]]] ———- = Median = {{{ lang=python line=1 import math nums = [5, 9, 10, 11, 22, 1, 0, -1] #< Fill list with values nums.sort() #< Sort the list in ascending order try: mid_num = ( len( nums ) - 1) / 2 median = nums[ mid_num ] except TypeError: #< There were an…

  • Working with files by inode

    [[[TOC]]] ——- = Find the inode number = * Use either ** `stat {file-name}` ** `ls -il {file-name}` ——- = Remove by inode with find = * `find . -inum [inode-number] -exec rm -Rfi {} \;` ** Beware, this is recursive and does not warn

  • add-apt-repository: command not found

    When attempting to add a repo on my pxe-boot chroot, I got the error: `add-apt-repository: command not found` {{{ root@server:/# add-apt-repository ppa:yannubuntu/boot-repair && apt-get update add-apt-repository: command not found }}} The solution is to install both `python-software-properties` and `software-properties-common` {{{ apt-get install -y python-software-properties software-properties-common }}}

  • Setup PXE Server Ubuntu

    In this tutorial, I will guide you through the process of creating a PXE server on an Ubuntu Host. This guide also includes complete setup instructions for the PXE client and DHCP server. I will also guide you through an effective storage/deployment method so that you may quickly deploy identical PXE images. ——- [[[TOC]]] ——-…

  • Generic Worker Thread – PyQT

    Below is a generic threading worker in PyQT: {{{ lang=python lines=1 from PyQt4 import QtGui, QtCore import logging class worker_thread(QtCore.QThread): ## Generic worker thread finished = QtCore.pyqtSignal(dict) #< Replace this for data type that will be returned def __init__(self, ret_function, function, *args, **kwargs): ## Init # @param Function ret_function Function to run on end #…

  • WordPress Setup – Ubuntu 12.10

    Requires a configured web server 1. WordPress was surprisingly simple to setup: apt-get install wordpress 2. Symlink wordpress to web directory ln -s /usr/share/wordpress /var/www/wordpress 3. Run setup script. (-n seems to be the database to create and the final option is the domain) /usr/share/doc/wordpress/examples/setup-mysql -n wordpress domain.com 4. Permissions chown -R www-data /usr/share/wordpress \…

Got any book recommendations?