Skip to content

Instantly share code, notes, and snippets.

<?php
require_once "conexion.php";
$database = array(
'usuario' => 'cotizador_dev',
'password' => '2cotizador_dev2',
'host' => 'segurosyfianzasmx.ipagemysql.com',
'db' => 'confianza_mx'
);
<?php
require_once "conexion.php";
$database = array(
'usuario' => 'cotizador_dev',
'password' => '2cotizador_dev2',
'host' => 'segurosyfianzasmx.ipagemysql.com',
'db' => 'confianza_mx'
);
jQuery( document ).ready(function() {
jQuery('#marca').click(function(){
jQuery.post('list.php', { type: "descripcion", id: jQuery('#marca').val()},
function(response){
jQuery('#descripcion').html('');
jQuery('#descripcion').append('<option value=\"\">-- Seleccione --</option>');
response = jQuery.parseJSON(response);
jQuery.each(response, function (k,v){
@NightZpy
NightZpy / Spain.sql
Created November 2, 2014 13:56
Tabla con poblaciones y provincias de españa.
This file has been truncated, but you can view the full file.
REPLACE INTO /*TABLE_PREFIX*/t_country (pk_c_code, s_name, s_slug) VALUES
('ES', 'Spain', 'spain');
REPLACE INTO /*TABLE_PREFIX*/t_region (pk_i_id, fk_c_country_code, s_name, b_active, s_slug) VALUES
(781283, 'es', 'A Coruña', 1, 'a-coruna');
REPLACE INTO /*TABLE_PREFIX*/t_city (pk_i_id, fk_i_region_id, fk_c_country_code, s_name, b_active, s_slug) VALUES
(190831, 781283, 'es', 'Zas de Rei', 1, 'zas-de-rei'),
(190832, 781283, 'es', 'Zas', 1, 'zas'),
(190833, 781283, 'es', 'Zapatal', 1, 'zapatal'),
@NightZpy
NightZpy / routes.php
Created November 7, 2014 21:10
Translaste routes laravel
Route::group(
array(
'prefix' => LaravelLocalization::setLocale(),
'before' => 'LaravelLocalizationRoutes' // Route translate filter
),
function()
{
/** ADD ALL LOCALIZED ROUTES INSIDE THIS GROUP **/
Route::get('/', function()
{
@NightZpy
NightZpy / chosen ajax
Created April 17, 2015 17:57
Chosen Ajax
$('.chzn-choices input').autocomplete({
source: function( request, response ) {
$.ajax({
url: "/change/name/autocomplete/"+request.term+"/",
dataType: "json",
beforeSend: function(){$('ul.chzn-results').empty();},
success: function( data ) {
response( $.map( data, function( item ) {
$('ul.chzn-results').append('<li class="active-result">' + item.name + '</li>');
}));
try
{
$this->registerChangeForm->validate($input);
$change = $this->changeRepository->create($input);
$this->setSuccess(true);
$this->addToResponseArray('change', $change);
$this->addToResponseArray('data', $input);
return $this->getResponseArrayJson();
}
public function getAllForSelect()
{
if($this->getModel()->first()->nombre)
return $this->getAll()->lists('nombre', 'id');
return $this->getAll()->lists('name', 'id');
}
omain Name: JESSIMARROMEROTAMARONIS.COM
Registry Domain ID: 1956268991_DOMAIN_COM-VRSN
Registrar WHOIS Server: whois.directnic.com
Registrar URL: http://www.directnic.com
Updated Date: 2015-09-01T00:49:42-05:00
Creation Date: 2015-08-30T06:40:08-05:00
Registrar Registration Expiration Date: 2016-08-30T06:40:08-05:00
Registrar: DNC Holdings, Inc.
Sponsoring Registrar IANA ID: 291
Registrar Abuse Contact Email: abuse@directnic.com
DELIMITER $$
create FUNCTION CuantosDiasSemana
(
FechaInicio datetime,
FechaFin datetime,
DiaSemana tinyint
)
RETURNS INT
BEGIN