I've been trying to understand how to setup systems from
the ground up on Ubuntu. I just installed redis onto
the box and here's how I did it and some things to look
out for.
To install:
| app.get('/', function(req, res){ | |
| var ua = req.header('user-agent'); | |
| if(/mobile/i.test(ua)) { | |
| res.render('mobile.html'); | |
| } else { | |
| res.render('desktop.html'); | |
| } | |
| }); |
| <html> | |
| <head> | |
| <script src="/dnode.js" type="text/javascript"></script> | |
| <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js" type="text/javascript"></script> | |
| <script type="text/javascript"> | |
| DNode({ | |
| session : function (session) { | |
| $('#auth :visible').slideUp(); | |
| $('#user').text(session.user); | |
| curl -s https://rvm.beginrescueend.com/install/rvm -o rvm-installer | |
| chmod +x rvm-installer | |
| ./rvm-installer 1.6.3 |
| #!/usr/bin/python | |
| import sys | |
| code = """#!/usr/bin/python | |
| import sys | |
| code = {0}{1}{0} | |
| def initial_solution(): |
| #!/usr/bin/env node | |
| var sys = require("sys"), | |
| fs = require("fs"); | |
| var indented = ""; | |
| (function (json) { | |
| indented = /(^[\t ]*)/.exec(json)[0] || ""; | |
| try { |
| #!/usr/bin/env python | |
| """ | |
| A script to query the Amazon Web Services usage reports programmatically. | |
| Ideally this wouldn't exist, and Amazon would provide an API we can use | |
| instead, but hey - that's life. | |
| Basically takes your AWS account username and password, logs into the | |
| website as you, and grabs the data out. Always gets the 'All Usage Types' |
| #!/usr/bin/env python | |
| """ | |
| A script to query the Amazon Web Services usage reports programmatically. | |
| Ideally this wouldn't exist, and Amazon would provide an API we can use | |
| instead, but hey - that's life. | |
| Basically takes your AWS account username and password, logs into the | |
| website as you, and grabs the data out. Always gets the 'All Usage Types' |