Skip to content

Instantly share code, notes, and snippets.

View joexcodex's full-sized avatar

joexcodex joexcodex

View GitHub Profile
@joexcodex
joexcodex / ajax_cheat_sheet.md
Created September 16, 2017 01:08 — forked from joelrojo/ajax_cheat_sheet.md
AJAX 101 cheat sheet

#AJAX

What is AJAX

"AJAX an acronym for asynchronous JavaScript and XML is a group of interrelated web development techniques used on the client-side to create asynchronous web applications. With Ajax, web applications can send data to, and retrieve data from, a server asynchronously (in the background) without interfering with the display and behavior of the existing page. Data can be retrieved using the XMLHttpRequest object. Despite the name, the use of XML is not required (JSON is often used instead), and the requests do not need to be asynchronous." - wikipedia

AJAX with jQuery

jQuery provides a $.ajax() method with a set of options for sending requests and callback methods to handle responses.

  • Here is the most basic $.ajax() request that does not send any data. It will be handled by the post '/trips' route on the server. You can choose any of the http request verbs for the type parameter (get, post, put, delete)
@joexcodex
joexcodex / Import.php
Created September 14, 2017 18:51 — forked from ismobroto/Import.php
Controller Import Excel (Codeigniter)
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/*
* Author : Ismo Broto : git @ismo1106
*/
class Import extends CI_Controller {
public function __construct() {
parent::__construct();
$this->load->library('PHPExcel');
@joexcodex
joexcodex / sendMailConfigFile
Created September 14, 2017 18:49 — forked from jrvaja/sendMailConfigFile
CodeIgniter:SendMailConfigFile
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
$config['protocol']='smtp';
$config['smtp_host']='ssl://smtp.googlemail.com';
$config['smtp_port']=465;
$config['smtp_user']='jminvaja007@gmail.com';
$config['smtp_pass']='rko261187';
@joexcodex
joexcodex / .htaccess
Created September 14, 2017 18:48 — forked from EdwinPalacios/.htaccess
Ayudas codeigniter
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
@joexcodex
joexcodex / .htaccess
Created September 14, 2017 18:40 — forked from somecuitears/.htaccess
Codeigniter
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /codeigniter/
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
RewriteCond %{REQUEST_URI} ^application.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
@joexcodex
joexcodex / doc.md
Created September 14, 2017 17:35 — forked from aloon/doc.md
Chuleta GIT

#GIT

Configuracion inicial

Global

git config --global user.name "Alex Gonzalez"
git config --global user.email miemail@domain.cat
git config --global color.diff auto
git config --global color.status auto
git config --global color.branch auto