Skip to content

Instantly share code, notes, and snippets.

View NickAlvesX's full-sized avatar
🏠
Working from home

Nilson Junior NickAlvesX

🏠
Working from home
  • Clevertech
  • São Paulo, Brazil
View GitHub Profile
@earth774
earth774 / Controller.php
Created March 12, 2019 05:07
create upload image in lumen
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Laravel\Lumen\Routing\Controller as BaseController;
class Controller extends BaseController
{
public function uploadImage(Request $request)
@Ely-S
Ely-S / Deep extend.js
Created December 2, 2012 22:55
Fastest way to Deep Clone/Extend an object in javascript
//benchmark available here
// clone is the object to recursively copy the attributes of obj to overwriting as necessary.
function x(clone, obj) {
for(var i in obj)
clone[i] = (typeof obj[i] == "object") ? x(obj[i].constructor(), obj[i]) : obj[i];
return clone;
}