pZtrick.com

the personal site of patrick paul

Add an Inforc to Your Linux Dotfiles or Bashrc


Comments

I use a dotfiles repo to maintain my Linux profile settings across multiple machines (e.g. .bashrc and .vimrc and .gitconfig). Every so often, I manage to break one of my remote hosts’ SSH agent for passwordless authentication (after I unlock the PGP keys locally with a password on boot) – and all of a sudden I can’t run my deployment and git scripts on the remote host. (Because they can’t do keypair authorization with github.com et al).

So… I sought to add a brief message about whether SSH agent was running (and which key it had loaded). I routinely edit my .localrc to print pertinent server information upon remoting into a Linux server, but as it would be duplicative to add such info about my SSH agent to all servers’ .localrc I packed it into my dotfiles repo. And then I separated it out as an inforc file to keep my repo neat and clean.

How to Strip the Django @staff_member_required Decorator


Comments

Today, I was bashing my head on the wall trying to figure out why the AJAX image/file upload for django-wysiwyg-redactor was returning a cryptic CSRF token error message and 403 Forbidden response. I tried injecting the CSRF token into the Redactor forms using jQuery – which didn’t work – and then tried csrf_exempt-decorating the forms – which also didn’t work.

I probably spent way too much time on these two hacks before actually looking into the source code…

My Keystone XL Public Comment

I’m feeling rather un-inspired to write a fresh post for Earth Day 2014, so I will settle for cross-posting the public comment that I submitted to Regulations.gov regarding the State Department’s consideration of the permit application for the Keystone XL tar sands oil pipeline project. After the fold: