Zeven Rodriguez

Stuff

Adafruit Stepper Gear

Stuff, Tutorials

Comments Closed


Share this post

This Adafruit Stepper Gear has a star shaped post which make is difficult to use in a gear. In inkscape you can go to Extensions > Render > Gear and use these settings to create the star shaped post:

Number of Teeth: 10

Circular Pitch: 6.4

Pressure angle: 10

Read more

Openframeworks to work with visual studio express 2010 C++

Stuff

Comments Closed


Share this post

Getting openframeworks to work in windows 7 was not tooo bad. Once you d/l visual c++ studio express 2010 and openframeworks you are ready to go. So one when you open studio express, open a project, right click on it and go to properties.

I found this link very useful in helping me build a project

http://www.openframeworks.cc/forum/viewtopic.php?f=2&t=3899

Steps c, d, and e I found to be the most important.

Once you get that done, I went ahead and built the project. I had no errors. I found the empty project the best one to build. The build process takes a bit so be patient.

One of the things with visual studio is that once you build I expected to see the sketch just pop up. That did not happen. If you look at the top tool bar in visual studio there is a green arrow button. It says start debugging. Click on it to start the sketch.

Read more

Apache 2.2 and mod_wsgi configuration

Stuff

Comments Closed


Share this post

I finally got mod_wsgi to work. mod_wsgi is a module that lets you run python scripts on your webserver. You need to have access to install applications and configure apache

For information about mod_wsgi and more elaborate explanations on configuration and installation visit http://code.google.com/p/modwsgi/

I am running centos5.4, apache 2.2, and python 2.6.5

First create a directory to do the initial download of mod_wsgi’s code

cd into that directory

Then do a wget mod_wsgi’s google code site and find the version you need

That should look something like this:
wget http://modwsgi.googlecode.com/files/mod_wsgi-3.3.tar.gz

This command unpacks the tarball:
tar xvfz mod_wsgi-3.3.tar.gz

cd into the unpacked mod_wsgi-3.3 folder

type: ./configure

once configured

type: make

type: make install

Once that is done we want to restart the apache server

cd into etc/ from your top most or / directory and

type: service httpd stop

You will get and OK if everything is fine

type: service httpd start

One way to know that it installed correctly is going into your apache modules file and making sure that mod_wsgi.so is in that folder. In my install of apache2.2, the modules are located in etc/httpd/modules

The most important part of configuring apache with mod_wsgi is to make sure what your DocumentRoot is.

In CentOS my apache2.2 configuration file was located in etc/httpd/conf/httpd.conf

cd into etc/httpd/conf

when you type: nano httpd.conf it loads the nano file editor

The DocumentRoot is where when you visit www.example.com
the initial directory that opens when you visit your website

httpdocs is my root directory. All of my site files are located there

DocumentRoot /var/www/vhosts/zevenwolf.com/httpdocs

Apache wants the serverpath of where files like index.html might reside

load module enables mod_wsgi when a person visits the script

This should be placed with in your Apache sites configuration which is normally located at the bottom of the httpd.conf file

LoadModule wsgi_module modules/mod_wsgi.so

This portion of the code tells mod_wsgi that in the python_projects directory located in the serverpath var/www/vhosts/zevenwolf.com/httpdocs/python_projects/
there are files that need to run mod_wsgi

WSGIScriptAlias /python_projects/ /var/www/vhosts/zevenwolf.com/httpdocs/python_projects/


Order deny,allow
Allow from all

The mistake I initially made was not putting the httpdocs. I originally wanted to host this folder outside of httpdocs, so my serverpath looked like this:

/var/www/vhosts/zevenwolf.com/python_projects/

Because the DocumentRoot is set at /var/www/vhosts/zevenwolf.com/httpdocs/

When you visit www.zevenwolf.com/python_projects
the serverpath you go to is /var/www/vhosts/zevenwolf.com/httpdocs/python_projects

So once I added the httpdocs it worked. My final apache code for my site looks like this:


DocumentRoot /var/www/vhosts/zevenwolf.com/httpdocs
ServerName www.zevenwolf.com
ServerAlias zevenwolf.com zevenrodriguez.com www.zevenrodriguez.com zevenwithaz.com www.zevenwithaz.com
ErrorLog logs/zevenwolf.com-error_log
CustomLog logs/zevenwolf.com-access_log common

AllowOverride All

ScriptAlias /cgi-bin/ /var/www/vhosts/zevenwolf.com/cgi-bin/

LoadModule wsgi_module modules/mod_wsgi.so

WSGIScriptAlias /python_projects/ /var/www/vhosts/zevenwolf.com/httpdocs/python_projects/

//
Order deny,allow
Allow from all
//

//

Read more

Solar Design Presentation

Stuff

Comments Closed


Share this post

Solar Design Presentation

Read more