Skip to content

Instantly share code, notes, and snippets.

View saystone's full-sized avatar

이승재(Seungjae Lee) saystone

View GitHub Profile
@todgru
todgru / aws-ec2-redis-cli.md
Created June 12, 2014 23:01
AWS redis-cli on EC2
class @BaseCtrl
@register: (app, name) ->
name ?= @name || @toString().match(/function\s*(.*?)\(/)?[1]
app.controller name, this
@inject: (annotations...) ->
ANNOTATION_REG = /^(\S+)(\s+as\s+(\w+))?$/
@annotations = _.map annotations, (annotation) ->
@bennadel
bennadel / directive-repaint.htm
Created April 24, 2013 13:54
Forced Repaints In Directive Can Cause Accidental Scrolling In AngularJS
<!doctype html>
<html ng-app="Demo" ng-controller="DemoController">
<head>
<meta charset="utf-8" />
<title>
Forced Repaints In Directive Can Cause Accidental Scrolling In AngularJS
</title>
</head>
<body>
@kentbrew
kentbrew / node-on-ec2-port-80.md
Last active May 21, 2025 03:29
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);