Beaded Bunny vibrator
 

All posts in Programming

Encryption Software

I have been using ccrypt for my encryption needs for quite a while now. I have mainly used it on my desktop but recently I wanted to install it on my lappy. The README that comes with the package can walk you through the steps pretty well but I did have to do some investigating to get it installed. After unpacking the latest version of ccrypt for OS X open terminal and type “echo $PATH” to determine where OS X will be looking for executables. This is my output on 10.4 “/bin:/sbin:/usr/bin:/usr/sbin” . I then copied the ccrypt executable to /usr/bin and while in that directory made a couple of symlinks by typing these three separate commands

sudo ln -s ccrypt ccencrypt
sudo ln -s ccrypt ccdecrypt
sudo ln -s ccrypt ccat

I then wanted to install my man page for ccrypt. You can find your man page path by typing “manpath“. This is my output: “/usr/share/man:/usr/local/share/man:/usr/X11R6/man
I then copied “ccrypt.1” to “/usr/share/man/man1” so that now when I type “man ccrypt” in terminal it will output the man page. Now you are ready to encrypt some files!! Make sure you remember your encryption key because there is no way to recover a encrypted file with out the encryption key. This is why you encrypted them in the first place.

QEMU Mac OS X

For my Operating Systems class this semester I get the wonderful privilage of implementing different aspects in an OS. We are working with an OS called MINIX, which is an extremely small and based largely on UNIX. To help start us on our project we were given Knoppix 3.7 with a MINIX package. Knoppix is a bootable live system cd that is also based on UNIX. In class we were given a walk thru of how to boot up MINIX in Knoppix using QEMU. My problem was that the given Knoppix cd will only run on PC. So I had to looked for a version of QEMU that would run under OS X. The program that I liked the best is called QemuX. The initial download is just a small app that will download and install the latest and greatest QEMU. Here are some others that I have found.

QEMU OS X Binaries
QEMU Darwin Port OS X

and here is an archive of the MINIX folder that was included on our knoppix cd by our professor. It includes a.img which is a logical floppy image and linux-dist.tar.gz which holds the b30m disk image to boot minix.

minix.zip 17.23mb

Wrapping Text Around Images

I have added the capability to wrap text around my images. Although it does not work well when you have multiple images and not a whole lot of text, it still is nice to have this feature. Here is the code to go in your styles.css in your theme folder for WordPress (make sure you don’t already have this)

//This sets the border color and thickness around your image
img {
border:solid green 1px;
}

//This sets the border for when you want to hover over an image
a:hover img {
border: dashed green 1px;
}

//this is for setting a border if the image is a link
//it's current set to no border
a img {
border:0;
}

//sets the padding around the image
p img {
padding: 0;
max-width: 100%;
}

//right justification
img.right {
padding: 4px;
margin: 0 0 2px 7px;
display: inline;
}

//left justification
img.left {
padding: 4px;
margin: 0 7px 2px 0;
display: inline;
}

.right { float: right }
.left { float: left }
//centering image
img.centered {
display: block;
margin-left: auto;
margin-right: auto;
}

And this is how you would use it if you were to left justify your image

<img src="http://www.halfzware.com/wordpress/wp-content/thumb-FrontHouseBefore.jpg" <b>class="left"</b> alt="Front Of House Before "/>

Creating OpenGL Programs in Xcode V2.1

Compiling Opengl/Glut Programs

On Mac OS X using XCode v2.1

OpenGL is an integral part of OS X —all of the proper libraries (Frameworks) are already built into
the OS. To create an OpenGL/Glut program—
-Open up Project Builder.

Go to File -> New Project. Select Cocoa Application (Do not select C++ Tool for a barebones C++
application.)

-Name the project whatever you want.
Go to Project -> Add To Project… and add the GLUT.framework and the OpenGL.framework.
(located under /System/Library/Frameworks NOT /Library/Frameworks) Stick these Frameworks
under “Frameworks” in your project. Or right click on the Frameworks folder in your Project
and go to Add ->Existing Frameworks…

-Delete the file “main.m” from the “Other Sources” directory. Also delete “Other Frameworks” from
Frameworks. Be sure to only delete the references and not the actual files.

-Add your OpenGL and/or GLUT *.cpp and *.h files to the Classes directory. You can do this by
Highlighting your Classes folder and selecting Action -> Add -> Existing Files

-If your OpenGL program files have the include library , change this to .
If you are including and/or , you’ll need to change them to and/or
respectively.

-Build the program and run it.

*Note – If you get a “signal 10 (SIGBUS) Error” then you are not selecting “Cocoa Application” when
you creat your new project.