Skip to content

Instantly share code, notes, and snippets.

View RafaRochaS91's full-sized avatar

Rafael Rocha RafaRochaS91

View GitHub Profile
@irfaan008
irfaan008 / deepClone.js
Created August 17, 2018 20:44
Deep Copying javascript objects/properties
// Problem Statement :
// Write a function called deepClone which takes an object and creates a copy of it.
// e.g. {name: "Paddy", address: {town: "Lerum", country: "Sweden"}} -> {name: "Paddy", address: {town: "Lerum", country: "Sweden"}}
// Solution
// This file shows ability of multiple approach with their advantages and disadvantages and 2 fully tested and working approach.
// One has been written by me and another has been received from community to showcase that self written code is more concise and readable.
// Just run this file in Node Js environment to get the result.
// To run test cases, un comment method named test() in the bottom of file
@subfuzion
subfuzion / curl.md
Last active April 8, 2026 18:17
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@chantastic
chantastic / on-jsx.markdown
Last active March 1, 2026 06:00
JSX, a year in

Hi Nicholas,

I saw you tweet about JSX yesterday. It seemed like the discussion devolved pretty quickly but I wanted to share our experience over the last year. I understand your concerns. I've made similar remarks about JSX. When we started using it Planning Center, I led the charge to write React without it. I don't imagine I'd have much to say that you haven't considered but, if it's helpful, here's a pattern that changed my opinion:

The idea that "React is the V in MVC" is disingenuous. It's a good pitch but, for many of us, it feels like in invitation to repeat our history of coupled views. In practice, React is the V and the C. Dan Abramov describes the division as Smart and Dumb Components. At our office, we call them stateless and container components (view-controllers if we're Flux). The idea is pretty simple: components can't