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:
#!/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' |
#!/usr/bin/env node | |
var sys = require("sys"), | |
fs = require("fs"); | |
var indented = ""; | |
(function (json) { | |
indented = /(^[\t ]*)/.exec(json)[0] || ""; | |
try { |
#!/usr/bin/python | |
import sys | |
code = """#!/usr/bin/python | |
import sys | |
code = {0}{1}{0} | |
def initial_solution(): |
curl -s https://rvm.beginrescueend.com/install/rvm -o rvm-installer | |
chmod +x rvm-installer | |
./rvm-installer 1.6.3 |
<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); | |
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'); | |
} | |
}); |
# logger = require('logger').create() | |
# logger.info("blah") | |
# => [2011-3-3T20:24:4.810 info (5021)] blah | |
# logger.debug("boom") | |
# => | |
# logger.level = Logger.levels.debug | |
# logger.debug(function() { return "booom" }) | |
# => [2011-3-3T20:24:4.810 error (5021)] booom | |
class Logger | |
constructor: (options) -> |
#!/usr/bin/env coffee | |
ticks = ['▁','▂','▃','▄','▅','▆','▇','█'] | |
exports.clark = (data) -> | |
m = Math.min data... | |
n = (Math.max(data...)-m)/(ticks.length - 1) | |
(ticks[(t-m)/n >> 0] for t in data).join('') | |
if require.main == module | |
data = process.argv |