I put together a script that generates a EXT JS grid for each table within a mysql database. A html, js and php file are created for each table.
It is barebones, but feel free to use as your own or push changes to github.
https://github.com/jonaldomo/php-ext_js-grid_creator/blob/master/php-ext_js-grid-creator.php
Instructions to use:
1. Assumes a web server is setup with PHP installed with network access to the mysql database.
2. Download and extract ExtJS 4 library from www.sencha.com
3. Download php-ext_js-grid-creator.php to web root on the webserver.
4. Edit lines 16-19 in the script with the mysql host, username, password and schema.
5. Edit lines 25-27 with the directory where ExtJS is housed in relation to the script. 26 is the SDK JS file and line 27 is the location of the CSS file.
6. Open a web browser and load the script in the address bar. Example: http://localhost/php-ext_js-grid-creator.php and load. Within seconds html, php and js will be generated. The grid will be viewable from the .html files.
Saturday, July 9, 2011
Tuesday, June 21, 2011
first commit of perl-command-line-rss
perl-command-line-rss is a perl script that you run from the command prompt (I started it for use in Windows, will add Unix functionality later). Once the list of feeds is pulled back, you can select an article and view it using Lynx.
It is hosted over at GitHub, you can view it at https://github.com/jonaldomo/perl-command-line-rss
It is hosted over at GitHub, you can view it at https://github.com/jonaldomo/perl-command-line-rss
md5sum fciv for windows
Windows used to come with fciv.exe which is a File Checksum Integrity Verifier utility. More information is over at the Wikipedia entry md5sum.
The file itself is available from Microsoft Support. Usage is on the same page as the download.
In short it gives the user the opportunity to confirm that the file you are downloading is legit and has not been tampered with.
The file itself is available from Microsoft Support. Usage is on the same page as the download.
In short it gives the user the opportunity to confirm that the file you are downloading is legit and has not been tampered with.
Monday, June 20, 2011
perl whois client
The below code snippet is a simple WHOIS client in Perl. I spent the majority of the time trying to find an easy syntax highlighter to use. I decided on https://gist.github.com It doesn't have line numbers, but it is only one line compared to SyntaxHighlighter or Google Code Prettify. Also Blogger doesn't allow LINK tags for external CSS.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* perl whois.pl google.com | |
*/ | |
use Net::Whois::Raw; | |
my $domainInfo= whois($ARGV[0]); | |
print $domainInfo; |
Subscribe to:
Posts (Atom)