Skip to content

Instantly share code, notes, and snippets.

@boundsj
boundsj / ViewController.swift
Last active May 7, 2020 04:53 — forked from hhartz/ViewController.swift
Mapbox offline pack resume bug
// Source code for mapbox offline pack resume bug
//
// Adapted from https://www.mapbox.com/ios-sdk/examples/offline-pack/.
// To download, use the shake gesture (ctrl-cmd-Z), and kill the app. When the app is resumed
// it will find a partial pack and resume it. Notice how the network and disk activity shows
// that a download is indeed ocurring, while there are no notifications posted on progress.
import UIKit
import Mapbox
@boundsj
boundsj / node-on-ec2-port-80.txt
Created October 26, 2011 05:06 — 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 TOTALLY WRONG SOLUTION:
Alter the port the script talks to from 8000 to 80:
}).listen(80);