Skip to content

Instantly share code, notes, and snippets.

View RR-Helpdesk's full-sized avatar
💭

Helpdesk RR-Helpdesk

💭
View GitHub Profile
@RR-Helpdesk
RR-Helpdesk / download-website
Last active March 7, 2023 07:16
Download Website with Wget
DOWNLAOD WEBSITE USING WGET
If you ever need to download an entire Web site, perhaps for off-line viewing, wget can do the job done. RUn the following commands in terminal.
wget \
--recursive \
--no-clobber \
--page-requisites \
--html-extension \
--convert-links \
@RR-Helpdesk
RR-Helpdesk / Deep Copy and Object
Last active June 10, 2023 12:22
# # #* *JAVASCRIPT: CODE SNIPPETS** For the data geeks out there, here's a cheatsheet of JavaScript code snippets that can come in really handy for formatting data from different sources or transforming it into a usable format.
#### DEEP COPY AN OBJECT
```js
var copiedObj = JSON.parse(JSON.stringify(obj));
```
Explanation: In JavaScript objects, copying an object variable results in copying only the reference to the same object. Hence, any changes to its embedded key-pair values result in changes made to the original object variable as well.
```js
@RR-Helpdesk
RR-Helpdesk / Deep Copy Object
Last active March 7, 2023 07:12
JS Snippets for N8N
####DEEP COPY AN OBJECT
```js
var copiedObj = JSON.parse(JSON.stringify(obj));
```
Explanation: In JavaScript objects, copying an object variable results in copying only the reference to the same object. Hence, any changes to its embedded key-pair values result in changes made to the original object variable as well.
```js