category

professional dilettante

tutorial

How to pass parameters as a query string to your PHP functions

In PHP, arrays are often used to pass parameters to functions so we don’t have to worry about the order or number of params. But there’s a simpler way to pass a series of key=>value pairs without typing out the structure of an array each time: use a query string.

Continue Reading »

Multiple Sinatra Apps with Nginx and Thin on Webfaction

I’ve been working on a Sinatra app to serve as a web development portfolio. I decided it is time to put it online using my shared host, Webfaction. Here in this post, I’m not going to go over all the steps to set up a Sinatra app. You can find my tutorial on that here: [...]

Continue Reading »

Using PHP Variable Variables With Form Data

A nice technique I discovered last week, mostly because I am lazy. Typically when handling form data with PHP, you need to create variables one by one, plucking values out of the PHP superglobal associative array, $_POST. For each form field whose value you want to validate and store, we usually declare variables and assign [...]

Continue Reading »

Emacs php-mode and php-electric-mode

Following up on my “To Do for Emacs PHP” post, I added a hook to start php-electric-mode automatically when Emacs goes into PHP mode. Without a hook, I had to type (from within php-mode),  M-x php-electric-mode lots of times in lots of buffers. I also went into the Semantic customization group and turned off semantic-show-unmatched-syntax-mode [...]

Continue Reading »

Changing the appearance of Emacs MuMaMo (nxhtml/php)

If you don’t need an explanation of MuMaMo, here’s the gist – do  M-x customize-group [return] mumamo [return] This brings up the group customization options for MuMaMo. Among other things, you can change the definition of ‘MuMaMo Background Chunk Submode Face’ and ‘MuMaMo Background Chunk MajorMode Face’.  If you haven’t worked with Emacs Customization groups [...]

Continue Reading »

Portable Ruby and Rails installs (Windows)

If you are developing on windows and need to use Ruby, or Ruby on Rails, AND you want to install to a portable drive. I have found 3 options thus far. 1. Instant Rails (no tweaking required, works if you just install to your portable drive) 2. FlashRails (worked, but I began using InstantRails for [...]

Continue Reading »

Making windows command prompt more visually appealing

If you are doing development on Windows, you should use the Consolas font.  If you’re on XP, you can refer to this post to get it to work. If you are on Vista, you should already have Consolas. After you have Consolas installed, you can start using it in the Windows Command Prompt.  Here is [...]

Continue Reading »

Easy show / hide with JavaScript and CSS

Easily show and hide content using JavaScript and CSS. If the demo on this page does not work, another version of the demo is here:http://cdia.zhannes.webfactional.com/js/toggle.php

Continue Reading »

WAMP install tutorial

Still best resource I’ve seen for installing wamp http://guides.jlbn.net/setwamp/setwamp1.html. This time around I had some problems because Microsoft’s IIS was running on port 80 which is where WAMP wants to run…  This results in a password prompt when you try to access http://localhost/ Can kill MS IIS by going to Control Panel (classic view) -> [...]

Continue Reading »

Magpie: Stupid simple rss parsing

http://magpierss.sourceforge.net/ For school we are doing small tech presentations where we share facts.  I figured it would be cool to aggregate my presentations on the domain i’m using for school.  Then I thought, it would be nice to just use my regular blog and then display the posts that relate to class/tutorials.  So after researching [...]

Continue Reading »

Most Recent Post

It’s been a long time, I shouldn’t have left you, part 1 …

But now I’m back.All official like.I do social stuff again.I see my friends.I’m moving into my own place again.And all that adult shit.

Categories

Content © professional dilettante
Proudly powered by WordPress
Theme designed by Artisan Themes

Entries (RSS)
Comments (RSS)

23 queries.
0.373 seconds.