Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Gabriel Neves ggwebdev

🎯
Focusing
  • Brasília - Brazil
View GitHub Profile
View Jquery-ajax-with-progress.js
$('body').on('submit', '#updateUser', function (e){
e.preventDefault(); e.stopPropagation();
var formData = new FormData(this), progressbar = $('.total-progress');
$.ajax({
url: $(this).attr('action'),
type: 'POST',
data: formData,
cache: false,
contentType: false,
processData: false,
View summernote-image-upload.js
$(function () {
$('#summernote').summernote({
focus: true,
height: 250,
callbacks: {
onImageUpload: function(files) {
sendFile(files[0]);
}
}
@ggwebdev
ggwebdev / randPass.php
Last active Oct 29, 2020
Make Rand Pass
View randPass.php
function randPass($leng = 20, $uppercase = true, $number = true, $simbol = true)
{
$lower = 'abcdefghijklmnopqrstuvwxyz';
$upper = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
$numbers = '1234567890';
$simbols = '?@[#_>(!&]{$*=<%}+)-^~';
$password = '';
$characters = '';
$character .= $lower;
@ggwebdev
ggwebdev / hiddenEmail.php
Created Mar 16, 2016
Overshadows e-mail
View hiddenEmail.php
function hiddenEmail($email, $domain_ = false){
$seg = explode('@', $email);
$user = '';
$domain = '';
if (strlen($seg[0]) > 3) {
$sub_seg = str_split($seg[0]);
$user .= $sub_seg[0].$sub_seg[1];
for ($i=2; $i < count($sub_seg)-1; $i++) {
@ggwebdev
ggwebdev / IPNPaypalLaravel.php
Last active Oct 29, 2020
Simple listener INP Paypal using laravel 4.2
View IPNPaypalLaravel.php
<?php
class IpnListnerController extends \BaseController {
private $sandbox = true;
private $notify_email = true;
private $receiver_email = 'seller@paypalsandbox.com';
protected function listener(){