Skip to content

Instantly share code, notes, and snippets.

Work, work!

Renan Lazarotto RenanLazarotto

Work, work!
  • Brazil
Block or report user

Report or block RenanLazarotto

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
Radiergummi / Cryptor.php
Last active May 11, 2020
A PHP class to encrypt and decrypt strings using a static application secret. Input is converted to hex strings to enable easier handling
View Cryptor.php
namespace Vendor\Library;
use function bin2hex;
use function hex2bin;
use function openssl_decrypt;
use function openssl_encrypt;
use function random_bytes;
rafael-neri / validar_cpf.php
Last active May 24, 2020
Validar CPF em PHP (Completo)
View validar_cpf.php
function validaCPF($cpf) {
// Extrai somente os números
$cpf = preg_replace( '/[^0-9]/is', '', $cpf );
// Verifica se foi informado todos os digitos corretamente
if (strlen($cpf) != 11) {
return false;
zuhairkareem / search_partial_string_array.php
Last active May 6, 2020
Search partial string in an array in PHP
View search_partial_string_array.php
* First Method.
function array_search_partial($arr, $keyword) {
foreach($arr as $index => $string) {
if (strpos($string, $keyword) !== FALSE)
return $index;
nurbek-ab / web.config
Last active Nov 22, 2018 — forked from lennart/gist:3787187
IIS rewrite rule for Symfony 2 (use at root directory)
View web.config
<?xml version="1.0" encoding="UTF-8"?>
<clear />
<rule name="TempRewriteToWeb" stopProcessing="false">
<match url="^(web/)?(.*)$" />
<action type="Rewrite" url="web/{R:2}" logRewrittenUrl="true" />
deyvin / jquery.serialize_replace.js
Created Mar 2, 2012
Forçar serialize() do jQuery reconhecer checkboxes mesmo não marcado
View jquery.serialize_replace.js
$(function() {
$.fn.serialize = function (options) {
return $.param(this.serializeArray(options));
$.fn.serializeArray = function (options) {
var o = $.extend({
checkboxesAsBools: false
}, options || {});
You can’t perform that action at this time.