category

professional dilettante

web development

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 »

GeoBlog app: Google Maps, Sinatra, Sqlite3, ActiveRecord, Webfaction, Nginx, Thin

For fun I had been working on Sinatra apps and experimenting with the Google Maps API. Worked out well that I needed to create a social “web 2.0″ application for school. So I adapted my Sinatra app to be a blog, and incorporated Geocoding and reverse Geocoding via the Google Maps JavaScript API. Currently, the [...]

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 »

Colorblind theme for Emacs

I’ve released an Emacs color theme that is easy on my colorblind eyes. It is up on github: http://github.com/zhannes/emacs-colorblind-theme. Small screenshot below, you can view the full Screenshot here. My theme is based on Oleg Shaldybin’s Railscasts color theme, a Textmate theme that he ported to Emacs. To use the colorblind theme, you need to [...]

Continue Reading »

Sinatra on Webfaction

So I got Sinatra running on my shared host, Webfaction. As I’ve said in past posts, I like working with Sinatra because it lets me write Ruby webapps without all the code required by larger libraries like Ruby on Rails. With Sinatra, I write more code and so it augments my Ruby learning and lets [...]

Continue Reading »

CSV to MySQL via ActiveRecord or Ruby MySQL Gem

Two scripts to use Ruby Hashes for working with CSV data and inserting results into a MySQL DB. For my purposes I didn’t want all my data from the CSV in a database, else I could have just imported a CSV using terminal or phpmyadmin, etc. Background: For a project, I get a bunch of [...]

Continue Reading »

Depth with CSS

Great article here:  http://www.zurb.com/article/277/3-ways-to-add-depth-to-any-website-with-c#comments on adding depth with CSS. I was doing an exercise for class and wanted to add some style. Here’s a glimpse of what I ended up with

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 »

ToDo – emacs php

add hook for php mode -disable ‘ show-unmatched-syntax minor mode ‘ -enable php-electric-mode by default.

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 »
← Newer Entries — Older Entries →

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.408 seconds.