Introducing TinyPop
TinyPop is a lightweight (1.5 KB minified) JavaScript for Growl like notifications. It can be used as an alternative to jGrowl when you don't want to use jQuery for a simple task.
phpUserAuth Released!
It's finally done! The package is up for grabs, with a quick starter guide.
Please go through the project page for more details!
The Readme.txt file inside folder "readme" contains instructions for installation and usage
Leave your comments/questions/suggestions on the project page.
Out.
Introducing phpUserAuth
Update: Please visit the project page for more details
After weeks of fighting with myself, I finally got down to work on something that has been on my mind for sometime now. Yes, it is yet another user authentication/management system in PHP. There are already some great ones out there, and some not so good ones. I wanted a system that was secure, flexible, and easy to work with. What took me an entire week of effort is presented below. Without further delay, presenting phpUserAuth
Features
- Secure with support for sessions based and/or cookie based authentication
- Tons of configuration option for those who know what they are doing. For others, its easy as a cake!
- Passwords are *always* hashed before they are sent over the network, with fallback to plain text if JavaScript is not supported in the browser
- Only salted, hashed passwords are saved in the database. Even if the DB is stolen, it is almost impossible to get the original password
- Support for multiple simultaneous sessions or a single active session
- Administrator can choose how users are activated after they signup. It can be automatic activation, manual activation by the admin, or an activation mail can be sent to the user
- Password is NEVER sent over the email. If the user forgets his password, he can request a password reset mail.
- User defined access control levels
- Flexible. If the administrator wants to add another field, simply updated the configuration file, and put the field in the signup form! The rest is taken care of by the script!
- Prevention from XSS attacks - all data sent to the server is cleaned using the excellent InputFilter class
- Support for template based HTML email notifications with changeable templates
- Emailing done through the excellent PHPMailer with support for SMTP+SSL
- Custom redirection after login/logout
- Pre-designed forms
- Snap in install - Simply drop the folder into your existing application, configure a few site options and database settings, and you are done!
Requirements
- PHP 5+ as the core classes are OO
- MySQLi support
- MySQL 5+ database server
Is that too much to ask? That being said, if you run a fairly recent server, all these should be there by default. For testing, you can check out XAMPP which is available for Windows, Mac and Linux!
License
I'm planning to release it under some open source license. If that doesn't work out, it will still be FREE
Download
It is not completely done yet. The admin area needs some work. So it will be released, when its done
Notes
1) As always, it isn't perfect! If you find any bugs, errors, or know a way where things can be done better, please leave a comment!
2) The application hasn't been profiled yet. There WILL be places where I might have complicated things. Will be taken care of after its been released
Lightweight Javascript inline editing
Update 2: Core methods rewritten for compatibility with browsers. Check change log for details
Update 1: Script updated considerably
There are many excellent scripts to edit something inline using javascript (like jeditable), but not many that work standalone. If you hate wanting to include a 50 KB library just for this simple functionality, you are in the right page. This script is tiny (1.7 kB minified) and works on most modern browsers
Steps:
1) Include the editable.js file in your page
2) Add the attribute class="editable" to a division, paragraph or table cell <td>
3) Click on the element for it to turn into a text box. Update the value, and press enter to save. Press tab or click anywhere on the page to discard updates and revert to the old value
Changelog
Version 0.2
- Support for all major browsers
- Table cell editing more robust
- Added support for IE 7 and 8. Uses ie.js for support for getElementsByClassName
Initial Release
- The editable box now fits to the size of the original element. You can see that in the demo
- Support for inline table cell editing is now included (Proper layout/orientation only work in FF for now. Horribly out of place in other browsers and will be fixed later)
- Editing of an element with other HTML tags now works better
Gotchas:
1) Only one element is editable at any instant (I wanted this specific feature for a project I'm working on)
2) The text box doesn't fit to the size of the original element (will be fixed)
Tested On:
Windows - Firefox 3.6, IE 7 & 8, Chrome
Mac - Firefox 3.6, Safari 4, Chrome
Terms:
Free to use for personal or commercial purposes, but please give credits
Notes:
I know it can always be better, and I'm just a beginner. So comments, suggestions always welcome!
MAC/IP address using Linux shell script
Ever wanted to get the MAC/IP address of your computer in a Linux shell script? The following two commands should work on most flavours of Linux/Unix
Note: It retrieves the address of eth0 interface by default. Make necessary changes as required.
IP:
/sbin/ifconfig | grep '\<inet\>' | sed -n '1p' | tr -s " " | cut -d " " -f3 | cut -d ":" -f2
MAC (H/W address)
/sbin/ifconfig | grep 'eth0' | tr -s " " | cut -d " " -f5