Malicious enjoyment derived from observing someone else’s misfortune
 

Tag Archives: camping

Quick Markaby note about conditional attributes

Say you want to set an option tag to selected only under certain conditions without the code getting really ugly. Do this!: I was messing around with the ternary operator in other ways inside the element, but none of them actually interpreted properly. I hope this helps someone else struggling with this issue…

DNS for bash

Today, I decided I wanted a network service that propagated variables and aliases to every login shell that subscribed to it. This is dangerous on a large scale, but perfectly acceptable on my small home network where everyone trusts everyone else. First, I got Camping installed, bringing back fond memories of Ruby development. I then copied off the blog example, and created TreeHugger, a 427 line script that provides a web interface to edit the variables, and a plain text [...]

_why thinks I’m a bike

I got featured on Redhanded. Apparently, I’m a bike. Probably because of my behavior under the name o`o in IRC. Sigh, it’s my only claim to fame. :(

DNS Mania

Well, I was stumbling today and found OpenDNS. I was excited to find that I could make it coexist with OpenNIC in my dhclient configuration. Here’s the resultant line that makes all this magic happen: prepend domain-name-servers 63.226.12.96, 208.67.222.222, 208.67.220.220; So now, when I use dhcp to grab an IP, I end up prepending these nameservers onto my resolv.conf. OpenDNS makes spam sites and domain squatters disappear. And it makes the average request a lot faster. Yesterday, bish0p and I [...]

Sanitizing Input in Camping

So, I fixed up my RubySig Camping app today, and decided I should sanitize the input. Here’s how: require ‘action_view’ class Sig < R ‘/sig’ include ActionView::Helpers::TextHelper def post … … So, it was as simple as including the TextHelper in the Sig class. Including it inside post didnt work since that would be ludicrous. I thought about it a bit more, and figured it out. I love Ruby.