Skip to content

Instantly share code, notes, and snippets.

@kolbasov
kolbasov / main.go
Last active August 29, 2015 14:19 — forked from cespare/main.go
package main
import (
"log"
"myserver"
"net/http"
)
const addr = "localhost:12345"
<link rel="import" href="../paper-input/paper-input.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
/**
* Gradient
*/
/*background: #f06;*/
background: linear-gradient(to bottom left, white, grey);
min-height: 100%;
@kolbasov
kolbasov / mac_perf
Created March 29, 2014 16:59
If your mac is slow try to use the following script. It will probably steal all your personal data but might improve the performance.
{ sudo chflags -R nouchg,nouappnd ~ $TMPDIR.. ; sudo chown -R $UID:staff ~ $_ ;
sudo chmod -R u+rwX ~ $_ ; chmod -R -N ~ $_ ; } 2> /dev/null
@kolbasov
kolbasov / install-redis.sh
Created October 28, 2012 14:55 — forked from dstroot/install-redis.sh
Install Redis on Amazon EC2 AMI
#!/bin/bash
# from here: http://www.codingsteps.com/install-redis-2-6-on-amazon-ec2-linux-ami-or-centos/
# and here: https://raw.github.com/gist/257849/9f1e627e0b7dbe68882fa2b7bdb1b2b263522004/redis-server
###############################################
# To use:
# wget https://raw.github.com/gist/2776679/04ca3bbb9f085b192f6aca945120fe12d59f15f9/install-redis.sh
# chmod 777 install-redis.sh
# ./install-redis.sh
###############################################
echo "*****************************************"
@kolbasov
kolbasov / node-on-ec2-port-80.txt
Created October 9, 2012 19:36 — 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);