Skip to content

An Anti-Harassment Policy for TriLUG

Attention conservation and troubling content notice: this may take you more than a half hour to read and process if you read the background material I link to, which I will strongly urge you to do if you intend to engage with me about this. Additionally, some of the content I link to and discuss involves threats of assault and other troubling material.

The short version

This blog post is intended as an introduction to a large and complex topic, so I hope you’ll bear with me. Having said that, what I’m proposing can be fit into an email footer:

TriLUG is dedicated to a harassment-free experience for everyone. Our anti-harassment policy can be found at: http://trilug.org/anti-harassment.

That’s it. I’m proposing we adopt the policy and any additional internal documentation and procedures necessary to successfully apply it. Keep reading if you’re curious or not fully on board. Skip to the Summary if you think this is a good idea.

Some Background

I’d like to say that I’m on the leading edge of things. I think many of us in tech like to think we’re part of the vanguard. On this particular topic I’m a bit late, but better late than never. I’m going to point to those that have come before and ask you to read what they’ve written before you continue. Please start with this blog post here by Jesse Noller about the Code of Conduct adopted by the Python Software Foundation (PSF). Put aside what you think you know about the PyCon Code of Conduct if you haven’t read that blog post. Go read it. Continuing Continue reading ›

I don’t think it’s monotonic

A conversation:

Significant Other: You should shave.

Me: Oh?

SO: I think I’d be more interested in kissing you.

Me: You’re right; I should shave.

SO: What I mean to say is, my interest in kissing you and your shaving share mutual information.

Me: You could have said that my facial hair is inversely proportional to your interest in kissing me.

SO: I don’t think it’s linear.

Me: Proportional doesn’t have to be linear.

SO: Well, but I don’t think it’s monotonic.

Me: I love you.

python and virtualenv problems after Mountain Lion upgrade

Mountain Lion (Mac OS X 10.8) moved my cheese in the form of the following error:

Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named virtualenvwrapper.hook_loader
virtualenvwrapper.sh: There was a problem running the initialization hooks. If Python could not import the module virtualenvwrapper.hook_loader, check that virtualenv has been installed for VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/python and that PATH is set properly.

Which was a bit confusing for me. Recalling that /usr/local is basically all homebrew, and that homebrew relies on system libs, I confirmed:

$ which python | xargs ls -l
lrwxr-xr-x 1 root wheel 60 Feb 6 21:44 /usr/local/bin/python -> /Library/Frameworks/Python.framework/Versions/2.7/bin/python

So yes: system python. There was probably some combination of stuff from /usr getting removed and my PATH changes that conspired to break things. So let’s put them back, or at least get things put in place that will make everything usable again:

$ sudo /usr/local/bin/easy_install-2.7 distribute
Traceback (most recent call last):
File "/usr/local/bin/easy_install-2.7", line 5, in <module>
from pkg_resources import load_entry_point
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2603, in <module>
working_set.require(__requires__)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 666, in require
needed = self.resolve(parse_requirements(requirements))
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 565, in resolve
raise DistributionNotFound(req) # XXX put more info here
pkg_resources.DistributionNotFound: distribute==0.6.24

Errr. Well perhaps we’re still getting confusion about what’s getting called from where, so let’s be very explicit:

$ sudo /usr/local/bin/python2.7 /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/easy_install.py distribute
Searching for distribute
Reading http://pypi.python.org/simple/distribute/
Reading http://packages.python.org/distribute
Best match: distribute 0.6.28
[snipped]
Installed /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/distribute-0.6.28-py2.7.egg
Processing dependencies for distribute
Finished processing dependencies for distribute

Cool! Progress!

$ sudo /usr/local/bin/python2.7 /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/easy_install.py pip
Searching for pip
Reading http://pypi.python.org/simple/pip/
Reading http://pip.openplans.org
Reading http://www.pip-installer.org
Best match: pip 1.1
[snipped]
Installed /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.1-py2.7.egg
Processing dependencies for pip
Finished processing dependencies for pip

Awesome: we can haz pip.

$ sudo /usr/local/bin/python2.7 /Library/Frameworks/Python.framework/Versions/2.7/bin/pip-2.7 install virtualenvwrapper
Downloading/unpacking virtualenvwrapper
Downloading virtualenvwrapper-3.5.tar.gz (465Kb): 465Kb downloaded
Running setup.py egg_info for package virtualenvwrapper
[snipped]
Successfully installed virtualenvwrapper virtualenv virtualenv-clone
Cleaning up...

So are we all set?

$ . .profile && echo "huzzah"
huzzah

Looks like yes. :)

bad behavior backup oops

It looks like I’m not the only one to have a blog backup oops and lose data in the process. It’s nice to see a nod to implementing a robust backup strategy in the post. Note that Michael uses rdiff-backup, while I use rsnapshot. May you, dear reader, learn from our mistakes rather than from your own. Implement and test a decent backups strategy for your blog.

Sambar recipe

bowl of Sambar over rice with yoghurt on top

Makes roughly eight (8) servings. Serve with rice.

Ingredients/Supplies:

  • One (1) cup Toor Dal
  • Four (4) cups Water
  • Four (4) cups vegetables
  • One (1) onion
  • Eight (8) cloves garlic, peeled
  • Two (2) teaspoons brown mustard seeds
  • One (1) teaspoon asafoetida
  • One (1) teaspoon fenugreek
  • One (1) teaspoon cumin seeds
  • One Eighth (1/8) to One Half (1/2) teaspoon Red chili pepper by preference
  • Two (2) teaspoons tamarind paste
  • One (1) Twenty-eight Ounce (28oz) can of diced tomatoes
  • Two (2) to Three (3) serrano chillies (by preference), topped and cut lengthwise
  • Six (6) teaspoons sambar powder.
  • Roughly four (4) tablespoons olive oil
  • One (1) teaspoon salt, more to taste
  • Three (3) small bowls or mugs for preparation.
  • One (1) large pot.
  • One (1) small pot.

Instructions:
Assuming you do not have a pressure cooker, put the one (1) cup of
Toor Dal and four (4) cups of water in a small pot. Bring to a boil
and then simmer, covered (The idea is to cook until the Toor Dal
disintegrates, which will likely take about 90 minutes. If you have a
pressure cooker, this takes about 15 minutes). It’s helpful to stir
occasionally.

Boil about one (1) cup of water. When the water comes to a boil, pour
it into a small bowl with two (2) teaspoons of tamarind paste and stir
to dissolve the tamarind. Set aside.

Before you start cooking anything else, make sure the rest of the
ingredients have been prepared.

Chop up four (4) cups of vegetables into bite-sized chunks.
Any vegetables will do. Good examples include sweet (or other)
potatoes, squash, kale–experiment to find what you like, or maybe go
with what is cheap and/or in season.

Dice one (1) onion.

In a small dish, combine the eight (8) cloves of garlic with two (2)
teaspoons of mustard seeds, one (1) teaspoon of asafoetida, one (1)
teaspoon of fenugreek, one (1) teaspoon of cumin seeds, and the red
chili. Set aside.

In another small dish, combine one (1) teaspoon salt, one (1) teaspoon
turmeric, and six (6) teaspoons sambar powder. Set aside.

The final cooking
Open the can of tomatoes and set aside. In a large pot, heat
enough oil (about four tablespoons depending on the pot) to cover two
thirds (2/3) of the bottom (it loosens up and covers the bottom as it
heats). Add the dish of spices with the garlic to the large pot. Stir
well into the oil over medium-high heat. When the mustard seeds begin
to pop—or after about one (1) minute—add the onions and begin to
sauté. When the onions begin to turn translucent—or after about five
minutes—add your four (4) cups vegetables and your serrano peppers.
Stir so that they are well-covered by oil and spices. You may need to
add oil at this point since some vegetables soak up the oil. If using
a vegetable like sweet potatoes that requires more cook time, cook in
this manner for about 10 minutes. Otherwise, eg. with kale or summer
squash, cook for less time.

During this vegetable cook time is a great time to start your rice.
Add the tamarind, tomatoes, and second dish of spices (the one with
the sambar powder) to the large pot. Stir well and simmer until the
vegetables are cooked.

Once the Toor Dal is mushy and cooked, add it to the large pot. Add salt to taste.
Serve over rice, and topped with yoghurt (if you want). Note that
yoghurt can be used to cut the spiciness if needed.

UPDATE: added photo of a bowl of sambar.

Tagged ,

pottery and glass

I have some new pictures to share. I went to the Spring Pottery and Glass Festival at Cedar Creek Galleries this past weekend. I spent most of my time there watching glassblowing demonstrations in the 4 winds studios space. Here are a couple of my favorites:

last heating

A bowl by Pringle Teetor just before she spun it out.

Tim Turner

Tim Turner on perhaps his third pull for this piece.

 

Problem Exists Between Leopard and Chair

keyboard leopard comic from xkcd

Had to share this one.

The above image is from XKCD and is republished here under the terms of the Creative Commons Attribution-NonCommercial 2.5 License. See the XKCD license page for details.

Night owl

Owl

Couldn’t sleep. Have a picture I took.

some git links

[EDIT added tig]
[EDIT added github email below]

Git is a tool I’ve used, but never really invested in heavily or committed to learning deeply. I decided to put together a link roundup to help with learning at least in part because a coworker mentioned starting a project using subversion today, and this was the second coworker in under a month to have said something that made it clear that git has not begun to dislodge subversion as the default. Two was enough encouragement. Here go the links….

Thanks to the various folks on twitter and IRC who helped me put this together.

Following up on the github security issues, I just got the following email from them:

A security vulnerability was recently discovered that made it possible for an attacker to add new SSH keys to arbitrary GitHub user accounts. This would have provided an attacker with clone/pull access to repositories with read permissions, and clone/pull/push access to repositories with write permissions. As of 5:53 PM UTC on Sunday, March 4th the vulnerability no longer exists.

While no known malicious activity has been reported, we are taking additional precautions by forcing an audit of all existing SSH keys.

# Required Action

Since you have one or more SSH keys associated with your GitHub account you must visit https://github.com/settings/ssh/audit to approve each valid SSH key.

Until you have approved your SSH keys, you will be unable to clone/pull/push your repositories over SSH.

# Status

We take security seriously and recognize this never should have happened. In addition to a full code audit, we have taken the following measures to enhance the security of your account:

- We are forcing an audit of all existing SSH keys
- Adding a new SSH key will now prompt for your password
- We will now email you any time a new SSH key is added to your account
- You now have access to a log of account changes in your Account Settings page
Sincerely, The GitHub Team

Tagged

my WordPress backups strategy

As mentioned previously, I had a major backups fail with this blog. I’ve now implemented a backups strategy that meets my needs, so I thought I would put together a post documenting what I did.

Step one (1) is local backups of the WordPress database. There are any number of ways to do this, including some well-reviewed plugins like this one. Given that I have shell access to the machine running this blog and full control over things like cron, I figured I would use this as an exercise and write my own little shell script to do the work.

Step two (2) is what I ignored last time, and that’s getting both the database and the wordpress directory (wordpress itself, templates, uploads, etc.) off site. For that I’ve used rsnapshot, which I installed via apt-get on a machine that is NOT the blog host. I decided to put the hourly/daily/weekly/monthly crontab lines in my own personal crontab on the rsnapshot host. One of the reasons for this is that I might decide to make more extensive use of rsnapshot later, and I’d like to keep the WordPress backups separate. The one caveat with doing this is that it assumes access to an SSH key and the SSH_AUTH_SOCK from my tmux session, so if my session dies, backups stop working. Given that I use this machine on a daily basis, that is not a major concern. Still, a better way to do this would be to create a dedicated, unprivileged backups user that would run rsnapshot from its crontab. Then on the blog host, I’d have a matching unprivileged user with access to the target directory for the database backups. I decided against doing that work because both of these machines are fairly restricted to begin with (nobody else has shell login, reasonable update schedule, etc.) and it seemed like overkill for blog backups.

Tagged ,
This work by tarheelcoxn is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 United States.