Skip to content

Instantly share code, notes, and snippets.

- Create EC2 instance - you should have your file.pem public key file saved somewhere.
- Assign Elastic IP.
- Configure security groups for ports 80, 20, pasv ftp range and if you want to enable ping: custom IMCP rule 'echo request'
ssh -i file.pem ubuntu@YOUR_IP
- INSTALL VSFTPD
sudo apt-get install vsftpd
to restart:
/*
var Foo = Class.extend(function() {
this.var1 = "var1 foo";
});
var Bar = Foo.extend(function() {
this.var1 = "var1 bar"
console.log(this.super.var1); // access var1 from the base class
});
@fudini
fudini / Color conversion
Created April 4, 2011 19:34
various color conversion functions
function hsv2hex(hsv) {
return rgb2hex(hsv2rgb(hsv));
}
function hex2hsv(hex) {
var dec = hex2dec(hex);
var rgb = dec2rgb(dec);
var hsv = rgb2hsv(rgb);
return hsv;
}
@fudini
fudini / hex2dec, dec2hex
Created March 26, 2011 16:17
convert hex to decimal
function hex2dec(hex) {
hex = hex.toLowerCase(hex).split('');
var dec = 0;
while(h = hex.shift()) {
var code = h.charCodeAt(0);
dec = dec << 4;
dec += code < 58 ? code - 48 : code - 87;
}
return dec;
}