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
| /** | |
| * UTF8 TRANSLITERATION | |
| * | |
| * @derivate https://gist.github.com/funkjedi/4138022 | |
| */ | |
| function utf8_transliteration($string) { | |
| $find = {" ","¡","¢","£","¤","¥","¦","§","¨","©","ª","«","¬","","®","¯","°","±","²","³","´","µ","¶","·","¸","¹","º","»","¼","½","¾","¿","À","Á","Â","Ã","Ä","Å","Æ","Ç","È","É","Ê","Ë","Ì","Í","Î","Ï","Ð","Ñ","Ò","Ó","Ô","Õ","Ö","×","Ø","Ù","Ú","Û","Ü","Ý","Þ","ß","à","á","â","ã","ä","å","æ","ç","è","é","ê","ë","ì","í","î","ï","ð","ñ","ò","ó","ô","õ","ö","÷","ø","ù","ú","û","ü","ý","þ","ÿ","Ā","ā","Ă","ă","Ą","ą","Ć","ć","Ĉ","ĉ","Ċ","ċ","Č","č","Ď","ď","Đ","đ","Ē","ē","Ĕ","ĕ","Ė","ė","Ę","ę","Ě","ě","Ĝ","ĝ","Ğ","ğ","Ġ","ġ","Ģ","ģ","Ĥ","ĥ","Ħ","ħ","Ĩ","ĩ","Ī","ī","Ĭ","ĭ","Į","į","İ","ı","IJ","ij","Ĵ","ĵ","Ķ","ķ","ĸ","Ĺ","ĺ","Ļ","ļ","Ľ","ľ","Ŀ","ŀ","Ł","ł","Ń","ń","Ņ","ņ","Ň","ň","ʼn","Ŋ","ŋ","Ō","ō","Ŏ","ŏ","Ő","ő","Œ","œ","Ŕ","ŕ","Ŗ","ŗ","Ř","ř","Ś","ś","Ŝ","ŝ","Ş","ş","Š","š","Ţ","ţ","Ť","ť","Ŧ","ŧ","Ũ","ũ","Ū","ū","Ŭ","ŭ","Ů","ů","Ű","ű","Ų","ų","Ŵ","ŵ","Ŷ","ŷ","Ÿ","Ź","ź","Ż","ż |
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
| /** | |
| * @package Adminer.css - Theme CSS for Adminer - blue | |
| * @version 2.1.4 | |
| * @date Sat, 24 Oct 2015 21:16:48 +0100, Slovakia | |
| * @author Robert Mesaros | |
| * @copyright Copyright © 2015 Robert Mesaros, rmSOFT | |
| * @web http://www.rmsoft.sk | |
| * @link http://www.rmsoft.sk/index.php/en/portfolio/programming-work/web-services/theme-for-adminer | |
| * | |
| * @donate https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=BB4D8Y28YZDH6 |
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
| /** theme "easy on the eyes" for Adminer by p.galkaev@miraidenshi-tech.jp */ | |
| /** customized by RobertoPC in https://gist.github.com/robertopc/bf2edac131bbaf789343fa9ce3ceb2e4 **/ | |
| @import url(//fonts.googleapis.com/css?family=Roboto+Mono:400,900); | |
| /* for font awesome */ | |
| *:not(.fa) { | |
| font-family: 'Roboto Mono', sans-serif; | |
| } |
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
| // Data e hora dd/mm/yyyy hh:mm | |
| var data = "01/01/2000 12:00:00".match(/^(0[1-9]|[12][0-9]|3[01])\/(0[1-9]|1[0-2])\/[0-9]{4} (0[0-9]|1[0-9]|2[0-3]):([0-5][0-9])$/); | |
| console.log(data); | |
| var email = "email@abc.com".match(/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/); | |
| console.log(email); |
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
| <?php | |
| function validar_cpf($cpf) | |
| { | |
| $cpf = preg_replace('/\D/', '', (string) $cpf); | |
| // Valida tamanho | |
| if (strlen($cpf) != 11) | |
| return false; | |
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
| sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys BBEBDCB318AD50EC6865090613B00F1FD2C19886 && | |
| echo deb http://repository.spotify.com stable non-free | sudo tee /etc/apt/sources.list.d/spotify.list && | |
| sudo add-apt-repository -y ppa:noobslab/indicators && | |
| sudo add-apt-repository -y ppa:noobslab/apps && | |
| sudo add-apt-repository -y ppa:nilarimogard/webupd8 && | |
| sudo add-apt-repository -y ppa:mpstark/elementary-tweaks-daily && | |
| sudo add-apt-repository -y ppa:webupd8team/java && | |
| sudo add-apt-repository -y ppa:transmissionbt/ppa && | |
| sudo apt-add-repository -y ppa:umang/indicator-stickynotes && | |
| sudo add-apt-repository -y ppa:yannubuntu/boot-repair && |
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
| <?php | |
| // Inclui o arquivo class.phpmailer.php localizado na pasta phpmailer | |
| require_once("phpmailer/class.phpmailer.php"); | |
| // Inicia a classe PHPMailer | |
| $mail = new PHPMailer(); | |
| // Define os dados do servidor e tipo de conexão | |
| // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= | |
| $mail->IsSMTP(); // Define que a mensagem será SMTP |
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
| <?php | |
| // Encriptando a senha | |
| $senha = 'ola mundo'; | |
| $hash = Bcrypt::hash($senha); | |
| // $hash = $2a$08$MTgxNjQxOTEzMTUwMzY2OOc15r9yENLiaQqel/8A82XLdj.OwIHQm | |
| // Salve $hash no banco de dados | |
| // Verificando a senha | |
| $senha = 'ola mundo'; |
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
| <?php | |
| /** | |
| * Bcrypt hashing class | |
| * | |
| * @author Thiago Belem <contato@thiagobelem.net> | |
| * @link https://gist.github.com/3438461 | |
| */ | |
| class Bcrypt { |
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
| <?php | |
| $this->load->library('email'); | |
| $this->email->initialize(array( | |
| 'protocol' => 'smtp', | |
| 'smtp_host' => 'ssl://smtp.googlemail.com', | |
| 'smtp_port' => '465', | |
| 'smtp_timeout' => '60', | |
| 'smtp_user' => '{{{email gmail}}}', |