This file contains hidden or 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 DATABASE `mydb` CHARACTER SET utf8 COLLATE utf8_general_ci; | |
| GRANT ALL ON `mydb`.* TO `username`@localhost IDENTIFIED BY 'password'; | |
| FLUSH PRIVILEGES; |
This file contains hidden or 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
| du -Sh | sort -rh | head -n 15 |
This file contains hidden or 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
| set nocompatible " Disable vi-compatibility | |
| set t_Co=256 | |
| colorscheme xoria256 | |
| set guifont=menlo\ for\ powerline:h16 | |
| set guioptions-=T " Removes top toolbar | |
| set guioptions-=r " Removes right hand scroll bar | |
| set go-=L " Removes left hand scroll bar | |
| set linespace=15 |
This file contains hidden or 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
| //function to return the pagination string | |
| function getPaginationString($page = 1, $totalitems, $limit = 15, $adjacents = 1, $targetpage = "/", $pagestring = "?page=") | |
| { | |
| //defaults | |
| if(!$adjacents) $adjacents = 1; | |
| if(!$limit) $limit = 15; | |
| if(!$page) $page = 1; | |
| if(!$targetpage) $targetpage = "/"; | |
| //other vars |
This file contains hidden or 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
| .hide-text { | |
| text-indent: 100%; | |
| white-space: nowrap; | |
| overflow: hidden; | |
| } |
This file contains hidden or 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
| var docElm = document.documentElement; | |
| if (docElm.requestFullscreen) { | |
| docElm.requestFullscreen(); | |
| } | |
| else if (docElm.mozRequestFullScreen) { | |
| docElm.mozRequestFullScreen(); | |
| } | |
| else if (docElm.webkitRequestFullScreen) { | |
| docElm.webkitRequestFullScreen(); | |
| } |
This file contains hidden or 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
| function getDateWithTimezone($formato = "F j, Y", $fecha = 0) | |
| { | |
| date_default_timezone_set('America/Guatemala'); | |
| if (preg_match("/([0-9]{4})[\/-]([0-9]{1,2})[\/-]([0-9]{1,2})/", $fecha,$partes)) { | |
| if (checkdate($partes[2],$partes[3],$partes[1])) { | |
| $fecha=strtotime($fecha); | |
| } else { | |
| return(-1); | |
| } |
This file contains hidden or 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
| // INPUT: $item_date | |
| $item_date = date("D, d M o G:i:s T",strtotime($item_date)); | |
| $today = date(DATE_RFC822); | |
| $diff_date=(strtotime($today) - strtotime($item_date)); | |
| $inMinutes=round($diff_date/60); | |
| $inHours=round($diff_date/(60*60)); | |
| $inDays=round($diff_date/(24*60*60)); | |
| if($inMinutes==1){$txt_date="hace un minuto";} |
NewerOlder