jrunscript on OS X

Filed under: devel @ 22:08

I just found this handy utility.

$ man jrunscript

I’m using it to deobfuscate some JavaScript.


PHP 5 + Apache 2 + MySQL 5 on OS X via MacPorts

Filed under: note to self,server @ 14:28
# Displays all files in Finder.  Optional: personal preference.
$ defaults write com.apple.Finder AppleShowAllFiles YES
# Relaunch Finder

# Update MacPorts
$ sudo port selfupdate
$ sudo port -u upgrade outdated

# Install MySQL
$ sudo port install mysql5-server
$ sudo port load mysql5-server
$ sudo -u _mysql mysql_install_db5
$ sudo mysqld_safe5 &
$ sudo /opt/local/lib/mysql5/bin/mysql_secure_installation

# Install Apache, PHP (with PEAR), PHP MySQL bindings
$ sudo port install apache2
$ sudo port install php5 +apache2 +pear
$ sudo port install php5-mysql

# Configure Apache
# The following line may not be necessary
? sudo cp /opt/local/apache2/conf/httpd.conf.sample  /opt/local/apache2/conf/httpd.conf
$ cd /opt/local/apache2/modules
$ sudo /opt/local/apache2/bin/apxs -a -e -n "php5" libphp5.so
$ sudo nano /opt/local/apache2/conf/httpd.conf
# Set DirectoryIndex to:
# DirectoryIndex index.html index.php
# Change DocumentRoot to whatever (e.g. /Users/michael/Sites
# Change <directory "{old DocumentRoot}"> to <directory "{new DocumentRoot}">
# In that <directory "{new DocumentRoot}"> section change to the following.
# Options Indexes FollowSymLinks MultiViews
# AllowOverride All
# In <ifmodule mime_module> section, add the following two lines
# AddType application/x-httpd-php .php
# AddType application/x-httpd-php-source .phps
$ sudo port load apache2

# Configure PHP
$ sudo cp /opt/local/etc/php5/php.ini-development /opt/local/etc/php5/php.ini
$ sudo nano /opt/local/etc/php5/php.ini
# set mysql.default_socket, mysqli.default_socket and pdo_mysql.default_socket to
# /opt/local/var/run/mysql5/mysqld.sock

# Start Apache
# Make sure System Preferences → Sharing → Web Sharing is turned off. 
$ sudo /opt/local/etc/LaunchDaemons/org.macports.apache2/apache2.wrapper start
# You may get a window asking if httpd can accept incoming requests.  Approve it.

# Add DB and tables to MySQL for easy WordPress install
$ mysql5 -u root -p
> CREATE DATABASE database_name_here;
> GRANT ALL PRIVILEGES ON database_name_here.* TO "username_here"@"localhost" IDENTIFIED BY "password_here";

# Install and Configure phpMyAdmin (will need to restart Apache when done)
$ sudo port install phpmyadmin
$ sudo nano /opt/local/apache2/conf/httpd.conf
# Add section
# <Directory "/opt/local/www/phpmyadmin/">
#     Options Indexes MultiViews
#     AllowOverride None
#     Order allow,deny                                                                 
#     Allow from all
# </Directory>
# In <IfModule alias_module> section add the following
# Alias /phpMyAdmin "/opt/local/www/phpmyadmin"

$ sudo nano /opt/local/www/phpmyadmin/config.inc.php
# See http://www.phpmyadmin.net/documentation/Documentation.html#config
# Fill in $cfg['blowfish_secret']
# Set $cfg['Servers'][$i]['auth_type'] = 'config';
# Add $cfg['Servers'][$i]['user'] = 'root';
# Add $cfg['Servers'][$i]['password'] = '{root password}';

$ sudo /opt/local/apache2/bin/apachectl {start|restart|graceful|graceful-stop|stop}
$ sudo /opt/local/share/mysql5/mysql/mysql.server {start|stop|restart|reload|force-reload|status}



Filed under: blogging,neat!,wordpress @ 11:05

I’m in San Francisco at the moment here at the WordCamp convention. So far I’ve learned how to “write a compelling blog” (please, have you been to blogwaffe before?).

More to the point, I finally got to meet Podz and Matt.

For all the readers at home, you can check out the .

Update 08.07.2006:

After lunch I went to talks about WordPress MU, server optimization and a really good one on microformats. I also met Ryan, Mark, Andy, and Donncha.

The day was made all the sweeter by the bumping afterparty. By the way, Ryan, your penalty for not attending the postWordCamp bash is to recommend to me a favorite beer of yours.


real ultimate waffe (.net) — 13:02

real ultimate waffe (.net). So I guess that makes three (or four, depending on how you count). Most of my “regular” “audience” won’t find it very interesting, though.


Welcome, friends!

Filed under: a group of folks,blogging,neat!,news @ 23:10

I know you’ve always wanted to post on blogwaffe. Or perhaps you’ve dreamed of publishing content on Apparent Horizons or \_jeff_{krimmel}.

Well you can’t.


But you can hit up the next big thing (next great American novel, big) over at email for pics (dot com).


8000, you’ve treated me well

Filed under: neat!,news,server @ 02:17

In a way, I’m a little sad to see it go. My unconventional port and I have been together for a long time now. It’s been a source of conversation, intrigue and misplaced pride. Sadly, the pros of moving on outweigh the cons.

For those of you who hadn’t noticed after this ~day of being offline: http://blogwaffe.com.

I didn’t want to name names until all had settled, but I’m now very happy to say that blogwaffe is being served by TextDrive. I absolutely could not be happier with the service or its people. TextDrive’s servers are fast, highly configurable and very usable while all the while the folks running the show are friendly, helpful and knowledgeable nearly to the point of being scary. I had a couple questions about the best way to move the site over while maintaining the old links. Not only did they have answers, they had implementable solutions. Many thanks to Ryan, Jason and the lot.

Also, I’d be remiss if I didn’t give a loud shout out to Matt who was responsible for setting us up the bomb in the first place. So thanks, Matt.


“About” to change hosts — 13:15

I’m switching web hosts sometime in the next day or two. Hopefully all will go smoothly and barely a change will be noticed. If things b0rk, please let me know.


WordPress — 02:22

Another WordPress update. It’s a security release, so you should definitely upgrade.


AJAX Comment Preview

Filed under: blogging,neat! @ 19:09

UPDATE: The documentation for this plugin is now on my AJAX Comment Preview page. All the talk below of the installation being hard is out of date. Things are much easier now.

I’ve looked around occasionally for a good comment preview plugin for the site. There’s a few “Live” preview plugins around, but I find an as-you-type update of your comment really annoying. Plus, those plugins are entirely javascript based; they can’t know what the server will do to a comment after it gets sent off, so it’s not robustly WYSIWIG.

There seemed to be no good pre-fab solution fitting all my criteria:

  1. Not live updating (who’d have thought you’d need to specify the negative)
  2. All content filtered through WordPress ensuring solid WYSIWIGnitude
  3. Delicious AJAX goodness to avoid hard refreshes

So I made my own.

Read more…



Filed under: a group of folks,blogging,neat! @ 13:09

I’ve been interested in a while in some sort of centralized feed reader. Currently, I use NetNewsWire on my laptop (a fantastic program), and Thunderbird at the office to keep track of all the sites I read. The problem is that the one reader I use doesn’t know anything about the other; I get fed the same articles in both.

Read more…

© mdawaffe (Michael D Adams) - Powered by WordPress - Full Credits