Technology and Development
Posts tagged snippets
Password strength meter in Javascript
Apr 27th
Well, unlike the normal ones that gives you a strength meter that goes from green to red indicating your password strength. This one gives you the time it would take for a normal PC to crack your password. The password strength meter is called ChronoStrength
For example mine.
This comes as a standalone javascript or as a JQuery plugin, so it is very easy to use. You can download the source code here. This code is created by smallhadroncollider.
Validate a simple form using JQuery
Apr 23rd
This is a way to validate a form using simple JQuery. Why re-invent the wheel when there’s so many type of wheels to choose from? and also, for sometimes, we are just lazy to find the best wheel possible for our project. What I’m trying to do here is not to spoon feed you the code, but to provide a simple and straight forward guide to very simple validation. I love simplicity
Let’s get straight to business! View it in action here.
Fascinated? Wanna get started slowly and get to the point? First thing first, include JQuery and the Plugins using this More >
Have FPDF integrate with CodeIgniter
Oct 16th
This is a simple, plug it in, it runs, guide. It is still highly recommended that you try and run FPDF successfully without Codeigniter first. So that you know how to actively runs it or your web server supports it.
Step 1: Download the Classes from the FPDF pages.The fpdf.php in the Codeigniter directory.
The font directory in the fonts directory
Step 2: Config File 1$config['fonts_path']= "path-to-your-fontsdir/fonts/"; Step 3: Create the init_fpdf.php 123456789<?php if (!defined('BASEPATH')) exit('No direct script access allowed'); if ( ! class_exists('fpdf')){ require_once(BASEPATH.'libraries/fpdf'.EXT); } $obj =& get_instance(); $obj->fpdf = new fpdf(); $obj->ci_is_loaded[] = 'fpdf'; ?> Step 4: Call it, use a controller to test 12345678$this->load->library('fpdf'); define('FPDF_FONTPATH',$this->config->item('fonts_path')); $this->fpdf->Open(); $this->fpdf->AddPage(); $this->fpdf->SetFont('Arial','B',14); $this->fpdf->SetY(30); $this->fpdf->Cell(40,10,'Hello World!'); $this->fpdf->Output('output.pdf','D'); More >Handpicked Handy PHP Libraries
Oct 15th
Do you ever wondering how to do certain things in PHP like generating graphs, generating pdf or parse RSS efficiently and easily. I found myself rewriting these codes every once in a while and was lucky enough to find these wonderful libraries/framework that are completely free and easy to use.
There are more, but I will only listed my handpicked best one out of these categories
RSS ParserNormally I would use Jquery to do this stuff, but meh. When it comes to PHP, it’s all the way PHP
SimplePie: Very fast, easy to use, PHP driven RSS Parser
Handy PHP Code Snippets
Oct 14th