Skip to content

Instantly share code, notes, and snippets.

View nishantmendiratta's full-sized avatar
🎯
Always Curious!

That Js Dev nishantmendiratta

🎯
Always Curious!
View GitHub Profile
@nishantmendiratta
nishantmendiratta / website-dl.md
Created February 23, 2024 19:25 — forked from stvhwrd/website-dl.md
Download an entire website for offline use with wget. Internal inks will be corrected so that the entire downloaded site will work as it did online.

The best way to download a website for offline use, using wget

There are two ways - the first way is just one command run plainly in front of you; the second one runs in the background and in a different instance so you can get out of your ssh session and it will continue.

First make a folder to download the websites to and begin your downloading: (note if downloading www.SOME_WEBSITE.com, you will get a folder like this: /websitedl/www.SOME_WEBSITE.com/)


STEP 1:

@nishantmendiratta
nishantmendiratta / 1: helloworld
Last active January 15, 2020 10:02 — forked from marthall/1: helloworld
Very basic python packaging
`#!/usr/bin/env python`
```
print "Hello World"
```
@nishantmendiratta
nishantmendiratta / node-on-ec2-port-80.md
Created May 1, 2016 22:40 — forked from kentbrew/node-on-ec2-port-80.md
How I Got Node.js Talking on EC2's Port 80

The Problem

Standard practices say no non-root process gets to talk to the Internet on a port less than 1024. How, then, could I get Node talking on port 80 on EC2? (I wanted it to go as fast as possible and use the smallest possible share of my teeny tiny little micro-instance's resources, so proxying through nginx or Apache seemed suboptimal.)

The temptingly easy but ultimately wrong solution:

Alter the port the script talks to from 8000 to 80:

}).listen(80);