####Server Ubuntu 10.04 LTS Lucid
##Process
Install ejabberd
| #! /bin/bash | |
| # The location of Sublime Text 2 application | |
| # The default path to be used when opening projects | |
| DEFAULT_PATH="/Applications/MAMP/htdocs/" | |
| # The project to open | |
| project=$1 |
| <?php | |
| class MY_Form_validation extends CI_Form_validation { | |
| // -------------------------------------------------------------------- | |
| /** | |
| * Set Rules | |
| * | |
| * This function takes an array of field names, validation |
| <?php | |
| class MY_Form_validation extends CI_Form_validation { | |
| public function set_message($lang, $val = '', $name = FALSE) | |
| { | |
| if($name !== FALSE){ | |
| $lang = $name.'.'.$lang; | |
| } |
| <input id="test_input" type="text" value=""/> | |
| <button id="disabler">Disable Input</button> | |
| <script> | |
| $('#disabler').on('click', function(){ | |
| // No callback | |
| // $('#test_input').toggleDisabled(); | |
| // With callback | |
| $('#test_input').toggleDisabled(function(el, disabled){ |
| <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
| /** | |
| * CodeIgniter | |
| * | |
| * An open source application development framework for PHP 5.1.6 or newer | |
| * | |
| * @package CodeIgniter | |
| * @author ExpressionEngine Dev Team | |
| * @copyright Copyright (c) 2008 - 2011, EllisLab, Inc. | |
| * @license http://codeigniter.com/user_guide/license.html |
| <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
| /** | |
| * CodeIgniter | |
| * | |
| * An open source application development framework for PHP 5.1.6 or newer | |
| * | |
| * @package CodeIgniter | |
| * @author ExpressionEngine Dev Team | |
| * @copyright Copyright (c) 2008 - 2011, EllisLab, Inc. | |
| * @license http://codeigniter.com/user_guide/license.html |
| # Backup your host file | |
| sudo cp /etc/hosts /etc/hosts.bak | |
| # Edit your host file | |
| # See 'hosts.example' for example contents | |
| vim /etc/hosts | |
| # Edit MAMP Apache configuration to include Virtual Hosts configuration |
| job="@daily which node" && cat <(grep -v "$job" <(crontab -l)) <(echo "$job") | crontab - |
| var countries = { | |
| AF: "Afghanistan", | |
| AL: "Albania", | |
| DZ: "Algeria", | |
| AS: "American Samoa", | |
| AD: "Andorra", | |
| AO: "Angola", | |
| AI: "Anguilla", | |
| AQ: "Antarctica", | |
| AG: "Antigua and Barbuda", |