Linux


Cisco Prime 3.x fills up /var

Symptom : Prime 3.7 won’t start. Reason : /var is full, as /var/log/wtmp fills up quickly : sudo -i ls -l /var/log/wtmp ade # utmpdump /var/log/wtmp | more [5] [06834] [tyS0] [ ] [ttyS0] [ ] [0.0.0.0] [Tue Feb 04 21:30:45 2020 CET] [5] [06835] [tyS1] [ ] [ttyS1] [ ] [0.0.0.0] [Tue Feb 04 […]

/var usage

Adding empty HTTP headers via libcurl (pycurl)

When testing for the correct behavior of the OWASP ModSecurity Core Rule Set, a popular Web Application Firewall rule set, I needed to send empty Acccept- and User-Agent headers. This is relatively simple on the command line with curl: $> curl –header “User-Agent;” https://example.com Pulling this off with libcurl (pycurl in my case), was way […]


auto-upgrade pip in Ansible role/task

Lets say you have an Ansible role in which you create a virtual-environment using Python 3.x: – name: Install python venv and requirements environment: http_proxy: http://proxy.domain.com:8080 https_proxy: http://proxy.domain.com:8080 HTTP_PROXY: http://proxy.domain.com:8080 HTTPS_PROXY: http://proxy.domain.com:8080 pip: extra_args: ‘–trusted-host pypi.python.org’ requirements: /path/to/requirements.txt virtualenv: /path/to/venv virtualenv_command: /opt/python-3.7.0/bin/python3.7 -m venv If your requirements.txt only contains the modules you really need for […]


returning JSON from a view in CakePHP 1.1

I know CakePHP 3.5 is out, and before CakePHP 2.x and even before CakePHP 1.3 allowed to render JSON easily. But suppose you have a large code-base in CakePHP 1.1 you have to maintain, and suddenly someone wants JSON out of it… If upgrading your CakePHP version is possible, do it. Else, consider the code […]