nathaniel's blog

TortoiseGit Create Patch Serial on Windows 7

Drupal 7 Patching With TortoiseGit

TortoiseGit is a great tool for developers. I recently started using it on Windows 7 and found out a few great things that may come in handy to others.

Initially I downloaded a module from the Drupal repository, did some work on it and assumed I could easily create a patch comparing my work on the desktop to the work in the Drupal repository. Not so much...

The trick is to create a local repository in a new folder on the local machine.

Screen Shot(s): 
TortoiseGit Create Patch Serial
Git Create repository here...

Cross Browser Compatibility

Ajax not working in IE9 compatibility mode:

In web development there is nothing more frustrating than cross browser compatibility, having to hack up your code so it will work in IE 7, IE 6?, compatibility mode, etc... ugh.

Real quick, cross browser compatibility is a term used to describe a website and coding that looks and functions the same in all web browsers. Safari, Fire Fox, Internet Explorer, etc. etc.

The Office Copier FTP Settings

I learned an interesting work around the other day while setting up a new copier machine in a small office that does not have an active server. There are a few work stations with different windows home versions, a basic Comcast router and a five port switch connected to that. The copier responds to DHCP well, so after plugging it into the switch / router I could access the copier from the other workstations. The fax line was simple enough, plug it in and it magically works.

Windows 7 Shutdown Timer

Start "Windows Command Processor" or Run... cmd
shutdown /s /t 7200

This bit of information will shutdown your computer after 7200 seconds (2 hours). Adjust the time as needed. Great for watching movies in the evening (think sleep timer) or listening to music from your cpu at night. Also useful for admins.

Drupal.attachBehaviors Simple Example

Javascript / JQuery / PHP / Ajax - Drupal 6

Update: 11/23/2011

This is a very popular topic, so I have decided to add a little more detail and hopefully clear up the process for some.
Visit the following links for a live example:

  1. Add custom Behaviors
  2. Attach behaviors to ajaxed content
  3. All together

An example module is attached below if anyone wants to take a closer look at the code.

This one was tricky:
While using javascript / jquery to call ajax functions backed by php I wanted to attach certain javascript behaviors to the new ajaxed content. In this case simply a resizable textarea in a form. This is how I got Drupal.attachBehaviors to work.

in the javascript file testing.js -> function testingBehaviors(action) { var url = '?q=testing/ajax/form/' + action; $('#test-form').load(url, function(){ Drupal.attachBehaviors(this); }); } in the php file testing.module -> function testing_init() { drupal_add_js(drupal_get_path('module', 'testing') . '/scripts/testing.js'); // will not work without the required js files loaded... drupal_add_js('misc/textarea.js'); }

The second step ensures that the required javascript files are loaded when the page is first loaded, before the ajax call.

Update:

Drupal links -

Download for Drupal 6: example module.

SciTE Text Editor

SciTE

Text editor...
Be sure to check the "properties" or "settings" files and adjust to your needs. Within my install package I have modified the following files:

SciTEGlobal.properties html.properties tex.properties

Setup FileZilla to use SciTE as default text editor. Edit -> Settings [File editing]. Select Use custom editor: Browse to the SciTE.exe file. i.e.

"C:\Program Files (x86)\SciTE\SciTE.exe"

Setting Up Localhost Server Windows 7 64bit

Steps on setting up (WAMP) a localhost for testing developing parallel to (LAMP) many of my web environments... Also useful for secure inner office, small business databases.

1. First download and install apache:
http://httpd.apache.org/download.cgi
Win32 Binary without crypto (no mod_ssl) (MSI Installer)

Network Domain, Server Name, etc. = localhost

Choose custom and select the directory where you want to install the server files. For my work station all server files will be on a separate drive.

Port 443 (https) timed out linux VPS

port 443 or in other words https is timing out with no trace of what the problem may be.

Checking the default conf files:

/etc/httpd/conf/httpd.conf /etc/httpd/conf.d/ssl.conf

One error found when comparing httpd.conf and ssl.conf is that mod_ssl.so (the ssl_module) was being loaded twice. Throwing an error every time I restart httpd.

The .CO Craze

The observation:

The .co craze. Will .co lead to the next generation of websites? Where a .co website is about whatever it is supposed to be about or will it lead to the same old bs as .com? People buying up domains and parking them somewhere never intending for anything useful to come of them. Ever. Hoping that by some strike of luck someone somewhere will offer them a million dollars for it... give me a break.

Syndicate content