This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE IF NOT EXISTS `users` ( | |
`id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, | |
`email` varchar(127) NOT NULL, | |
`username` varchar(32) NOT NULL DEFAULT '', | |
`password` char(80) NOT NULL, | |
`token` char(80) NOT NULL DEFAULT '', | |
`logins` int(10) UNSIGNED NOT NULL DEFAULT '0', | |
`last_login` int(10) UNSIGNED, | |
PRIMARY KEY (`id`) | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Added for prevent changes in a1_cores | |
/** | |
* User AUTHENTICATION module for Kohana PHP Framework using bcrypt | |
* | |
* bcrypt is highly recommended by many to safely store passwords. For more | |
* information, see http://codahale.com/how-to-safely-store-a-password/ | |
* | |
* Based on Kohana's AUTH, Fred Wu's AUTHLITE and Woody Gilk's Bonafide | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$array = array( | |
array(1,25), | |
array(2,50), | |
array(3,30), | |
); | |
$edades = json_encode($array); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/.git | |
/.settings | |
/.buildpath | |
/example.htaccess | |
/temp | |
/queue | |
.DS_Store | |
.project | |
.buildpath | |
.settings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.post('/account/updateprofile',$form.serialize(),function(Response){ | |
console.log(Response); | |
},'json'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if( ! $this->a1->login(Arr::get($post,'username',""),Arr::get($post,'password',""),Arr::get($post, 'remember', FALSE))) | |
{ | |
if(Model_Users::unique_username($post['username'])) | |
{ | |
throw new Kohana_Exception('Inexisting email'); | |
} | |
throw new Kohana_Exception('Wrong password'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
error_reporting(E_ALL); | |
ini_set('display_errors', 1); | |
ini_set('error_reporting', E_ALL); | |
/* | |
* | |
* ASI DEBE de SALIR | |
/users/ | |
/users/add | |
/users/javier/delete |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
*@example $array_categorys = get_array_categorys(); | |
*/ | |
function get_array_categorys() | |
{ | |
$categories = get_categories(array('type' => 'post','orderby' => 'name','order' => 'ASC','hide_empty' => false)); | |
$wp_cat = array(); | |
//Get categorys parents |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Square bracket array shortcut - keys and values are separated by colons: | |
$a = [1, 2, 3]; | |
$b = ['foo': 'orange', 'bar': 'apple', 'baz': 'lemon']; | |
//Square bracket array shortcut - keys and values are separated by double arrows: | |
$a = [1, 2, 3]; | |
$b = ['foo' => 'orange', 'bar' => 'apple', 'baz' => 'lemon']; | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ifup wlan0 | |
Internet Systems Consortium DHCP Client xxxx | |
Copyright 2004-2010 Internet Systems Consortium. | |
All rights reserved. | |
For info, please visit https://www.isc.org/software/dhcp/ | |
Listening on LPF/wlan0/xx:xx:xx:xx:xx:xx | |
Sending on LPF/wlan0/xx:xx:xx:xx:xx:xx | |
Sending on Socket/fallback | |
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 6 |