Înapoi la articole →

Cel mai recent articol

Ultima verificare

Urmăritori 0 urmăritori
Articole: 198
  1. I upgraded fontconfig on a machine that does not have internet access, from fontconfig-2.10.95-10 to fontconfig-2.10.95-11, and got the following error: error: Failed dependencies: font(:lang=en) is needed by fontconfig-2.10.95-11.el7.x86_64 This depende…

  2. If you have a CentOS 7 machine that does not have internet access, resolving dependencies when installing rpms can be tricky.

  3. Trying to fix operation not permitted when trying to write to NFS share.

  4. In these notes I configure borg on my FreeNAS jail (named fnbbu) to automatically backup up every night to both a local repository, and a remote repository at rsync.net. rsync.net vs Wasabi First, a quick comparison of rsync.net and Wasabi on price alone.

  5. In these notes I create a FreeNAS jail (using iocage rather than warden), install borg inside the jail, and use borg to communicate with a remote borg server hosted by rsync.net.

  6. This note detail how to update udev rules for an Ethernet connection and have them take effect without rebooting the machine.

  7. Using bash history to try and find a previous command, I found it had vanished and there was a mysterious * present against the line, which I had never seen before: 56 vi /etc/resolv.conf 57 sudo systemctl restart dnsmasq 58* 59 curl foo.bar Some sear…

  8. Visualising what is using up disk space To visualise what is taking up disk space I use qdirstat: $ sudo pacman -S qdirstat $ qdirstat Launching it opens a GUI which can be used to see what is hogging disk space.

  9. In these notes I create a dataset in FreeNAS, then set up the Windows (SMB) and Linux (NFS) shares.

  10. In these notes I write the FreeNAS ISO to USB and use it to install FreeNAS onto an HP Proliant Microserver; the server has four 3.5" SATA HDDs which will be configured as RAID, and one USB stick which will house the FreeNAS operating system.

  11. Creating the Client with iperf3-python If when calling this: >>> import iperf3 >>> client = iperf3.Client() You get this error: Exception AttributeError: "'Client' object has no attribute '_stdout_fd'" in <bound method Client.

  12. Our irreplacable family photos are stored scattered throughout the following diverse locations: My phone My old phone My wife’s phone My wife’s laptop My DropBox My old desktop PC My old Mac The SD card in our camera The SD card in a box in the loft The D…

  13. Situation A multi-threaded Python process is not terminating because a non-daemon thread is still alive.

  14. Install Scoop, a command line installer for Windows.

  15. What is Orgmk?

  16. Starting with Emacs 24, package.el is included with Emacs which provides a built-in package manager.

  17. Say you make some temporary changes to your network configuration in CentOS 7.

  18. Situation Need to create SIP requests and parse SIP responses as defined in RFC 3261.

  19. Through Device Manager in Windows you can view which COM port has been assigned to which device.

  20. pyrasite-shell (part of pyrasite) can be used to open a shell in an already running Python process.

  21. Posts for this website are written in markdown, and the HTML you read is generated by hugo.

  22. Situation: Want to run hugo on my laptop and access the website from my phone over wifi so that I can debug an issue that only occurs on my phone (issue does not occur in responsive mode using developer tools).

  23. If wanting to use MPSSE commands with an FTDI device, you cannot simply use Python pyserial’s serial.Serial().

  24. Taxonomies are ways of grouping content within Hugo.

  25. ctypes is Python library for calling C code from Python.

  26. Situation: given an existing small C program which was developed on Ubuntu 12.04 32-bit, build it on CentOS 7 64-bit with minimal, if any, modifications to the source.

  27. Using the Python requests library, I wanted to make a PUT request, and ignore any ConnectionError if it was an error 104 “Connection reset by peer”. (104 is ECONNRESET defined in errno.h).

  28. Using format rather than %s syntax for formatting strings in Python has many advantages.

  29. If you naïvely try and write a post in Hugo about shortcodes using markdown, including code examples of the shortcodes, Hugo will still try to parse and render the shortcode.

  30. Hugo v0.32 introduced image processing, which can be used to resize, fit or fill images.

  31. I wanted to unit test some Python code that uses sys.exit(exit_code) to verify whether the exit_code was as expected.

  32. A unit test which performed a GET to a Tastypie endpoint always raised the error: def check_filtering(self, field_name, filter_type='exact', filter_bits=None): """ Given a field name, a optional filter type and an optional list of additional relations,

  33. Situation: using a non-pk for the detail URL in tastypie.

  34. If using a decorator created using functools.wraps with pytest, it will give an error similar to the following if you attempt to use fixtures: TypeError: test_func() takes exactly 1 argument (0 given).

  35. Before beginning to develop the CSS for this website, I wanted to ensure I had a consistent base style across all browsers.

  36. I wanted one command I could run that would automatically watch my SCSS files and HTML files, and build them upon change, and serve up the resulting website.

  37. The makemigrations command does not require a database to be present.

  38. Changing the hostname of our VM running rabbitmq-server from old-hostname to new-hostname caused RabbitMQ to timeout all handshakes.

  39. Kombu connects to RabbitMQ.

  40. In Celery, you can ping all workers with either app.control.ping() or app.control.inspect().ping().

  41. For any arbitrary command: nohup <cmd> > cmd_log.txt & The & forks <cmd> into a separate process, and nohup (“no hang up”) ensures the process does not terminate once you log out.

  42. Tastypie offers a ResourceTestCaseMixin which can be inherited in conjunction with the Django TestCase to allow unit testing Tastypie endpoints in a unittest style manner.

  43. Given a Python package named my_package installed in the virtual environment /opt/venv/, and which contains a top level file celery_app.py which defines the Celery app object, this is how you can manually invoke Celery commands (e.g. to perform a ping): $…

  44. Monitor rabbitmq-server’s status with: $ rabbitmqctl status Note that it must be run with root else you will get the rabbitmq help printed out with the appended message Only root or rabbitmq should run rabbitmqctl.

  45. To set up an SSH tunnel from here to remote via gateway, as illustrated below: +------+ +---------+ +--------+ | here | | gateway | | remote | | 22:+-----+:22 | | | |50000:----------------+-----+:22 | | +-----+ | | | | | | | | | +------+ +---------+ +----…

  46. Opened a configuration file with vi: vi /etc/iproute2/rt_table

  47. By default Fabric uses port 22 because it is over SSH.

  48. General The full manual for firewalld on CentOS 7 can be found in section 5 of the RHEL 7 security guide.